powered by
Graphic Representation of a Color bar, function written by John Colby
color.bar( lut, min, max = -min, nticks = 11, ticks = seq(min, max, len = nticks), title = "", width = 1.75, height = 5, ncolmax = 100, digits = 4, pdf = NULL )
see reference https://stackoverflow.com/questions/9314658/colorbar-from-custom-colorramppalette
width and height of the device
maximum number of colors. Default is 100.
specified number of significant digits
character value for pdf output file. Default is NULL and no pdf file is created.
NULL
John Colby https://stackoverflow.com/users/412342/john-colby
https://stackoverflow.com/questions/9314658/colorbar-from-custom-colorramppalette
color.bar(colorRampPalette(c("light green", "yellow", "orange", "red"))(100), -1)
Run the code above in your browser using DataLab