colorScale | R Documentation |
Simple and flexible color scale.
colorScale( x, y, col, at = NULL, labels = NULL, horiz = TRUE, percx = NULL, percy = NULL, adj = 0, labels.cex = 1, title = "legend", title.cex = 1.2 )
x, y |
x and y coordinates of the bottom-left corner of the legend. |
col |
vector of colors. |
at |
vector of integers indicating colors to be labeled. |
labels |
labels. |
horiz |
a logical. Should the color scale be horizontal? |
percx, percy |
size of the color scale along the x-axis and the y-axis. |
adj |
adjust the position labels position. If |
labels.cex |
magnification to be used for labels. |
title |
legend title. |
title.cex |
magnification to be used for the title. |
plot(c(0, 10), c(0, 10)) colorScale(5, 5, gpuPalette("cisl", 10), at = c(2, 4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.