get_colour_palette: Returns nice colour palette based on the number of unique...

View source: R/helpers_plot.R

get_colour_paletteR Documentation

Returns nice colour palette based on the number of unique DEPTH values

Description

Returns nice colour palette based on the number of unique DEPTH values

Usage

get_colour_palette(dat.tidy)

Arguments

dat.tidy

Data to be plotted, in tidy format, as returned by the function convert_to_tidydata(). Must include the column DEPTH.

Details

If there are 6 or less unique values of DEPTH, returns a discrete viridis colour palette with 6 colours (Option D). If there are more than 6 unique values of DEPTH, returns a discrete colour palette with the number of colours equal to the number of unique values of DEPTH.

Value

Returns a vector of hex colours from the viridis palette

Author(s)

Danielle Dempsey

See Also

Other plot: get_xaxis_breaks(), plot_variables_at_depth()


Centre-for-Marine-Applied-Research/strings documentation built on Aug. 21, 2023, 8 a.m.