flpalette | R Documentation |
Plot methods defined in the ggplotFL package make use by default of a palette with a high contrast, useful to separate time series or categories. The palette consist of seven colours: red, blue, green, violet, orange, yellow and brown. This palette can be inspected at the [colorbrewe2.org site](http://colorbrewer2.org/?type=qualitative&scheme=Set1&n=7#type=qualitative&scheme=Set1&n=7).
flpalette
flpalette_colours(n = length(flpalette))
flpalette_grads(palette = flpalette, reverse = FALSE, ...)
scale_colour_flr(palette = flpalette, discrete = TRUE, reverse = FALSE, ...)
n |
Number of colours or individual colours to return, or number of colours to interpolate. |
palette |
Palette subset to create a gradual scale from, defaults to *flpalette*. |
reverse |
Should the palette be reversed, FALSE. |
... |
Elements to subset from palette, by name or position. |
discrete |
Is the palette to be applied to a discrete variable, TRUE. |
An object of class character
of length 8.
The palette is accessible as a named vector, *flpalette*. Two functions are also available to manipualte the palette. One to extract a subset of the palette, *flpalette_colours*, and another to create a gradation of colours between two or more of the palette colours, *flpalette_grads*.
A named vector of colors and HEX codes, or a function to obtain a gradient of colors fo a given length.
The FLR Team
FLComp
# CHECK flpalette
flpalette
scales::show_col(flpalette)
flpalette_colours()
flpalette_colours(5)
flpalette_colours(2:3)
flpalette_grads(flpalette_colours(3))(20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.