addscale | R Documentation |
method to plot a scale in image plot.
addscale(
z,
zlim = range(z, na.rm = TRUE),
col = grDevices::heat.colors(12),
breaks = pretty(zlim),
horiz = TRUE,
ylim = NULL,
xlim = NULL,
...
)
z |
matrix or vector |
zlim |
z limit |
col |
color |
breaks |
interval for the tickmarks |
horiz |
TRUE (default) to a horizontal scale |
ylim |
y limitS |
xlim |
x limit |
... |
other arguments to plot |
## Not run:
mat <- matrix(100:1,ncol = 10, byrow = F)
cor <- grDevices::heat.colors(100)
image(mat,axe = FALSE, main = "numbers from 1 to 100", col = cor)
axis(2)
addscale(mat, col = cor)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.