palette()
or the specified pal
as reference.colorlegend(col, pal = palette(), log = FALSE, posx = c(0.9, 0.93),
posy = c(0.05, 0.9), main = NULL, cex_main = par("cex.sub"),
cex_axis = par("cex.axis"), col_main = par("col.sub"),
col_lab = par("col.lab"), steps = 5, steps_color = 100, digit = 2,
left = FALSE, ..., cex.main = NULL, cex.axis = NULL, col.main = NULL,
col.lab = NULL)
col
is double, pal is used as a continuous palette, else as categorical onepar('cex.sub')
)par('cex.axis')
)par('col.sub')
)par('col.lab')
)par
color_data <- 1:6
par(mar = par('mar') + c(0, 0, 0, 3))
plot(sample(6), col = color_data)
colorlegend(color_data)
Run the code above in your browser using DataLab