color.bar | R Documentation |
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
)
lut |
see reference https://stackoverflow.com/questions/9314658/colorbar-from-custom-colorramppalette |
min |
see reference https://stackoverflow.com/questions/9314658/colorbar-from-custom-colorramppalette |
max |
see reference https://stackoverflow.com/questions/9314658/colorbar-from-custom-colorramppalette |
nticks |
see reference https://stackoverflow.com/questions/9314658/colorbar-from-custom-colorramppalette |
ticks |
see reference https://stackoverflow.com/questions/9314658/colorbar-from-custom-colorramppalette |
title |
see reference https://stackoverflow.com/questions/9314658/colorbar-from-custom-colorramppalette |
width, height |
width and height of the device |
ncolmax |
maximum number of colors. Default is 100. |
digits |
specified number of significant digits |
pdf |
character value for pdf output file. Default is |
This function is taken from https://stackoverflow.com/questions/9314658/colorbar-from-custom-colorramppalette. Plese visit the URL for major details and give your feedback if possible.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.