powered by
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, ... )
matrix or vector
z limit
color
interval for the tickmarks
TRUE (default) to a horizontal scale
y limitS
x limit
other arguments to plot
if (FALSE) { 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) }
Run the code above in your browser using DataLab