plot_color | R Documentation |
Generate the color scheme for the hake assessment
such that as more years of historical data are added on
that the more recent years are still the same color.
For example, the most recent year of data will always be
black and the second most recent year will always be red.
If more than the maximum number of color for the palette
are requested, a color ramp will be constructed for the
remaining colors, based on the palette
.
plot_color(num_colors = 10, palette = "Set1")
num_colors |
The number of colors to return |
palette |
A palette found in RColorBrewer::brewer.pal.info |
A vector of HEX colours
n <-18
plot(data.frame(1:n, 1), col= plot_color(n), pch = 19, cex = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.