plot_color: Colors for the Hake Assessment

View source: R/plot-color.R

plot_colorR Documentation

Colors for the Hake Assessment

Description

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.

Usage

plot_color(num_colors = 10, palette = "Set1")

Arguments

num_colors

The number of colors to return

palette

A palette found in RColorBrewer::brewer.pal.info

Value

A vector of HEX colours

Examples

n <-18
plot(data.frame(1:n, 1), col= plot_color(n), pch = 19, cex = 5)

pacific-hake/hake-assessment documentation built on Jan. 14, 2025, 9:12 p.m.