Create a ggplot2 color scale based on a predefined tscv palette.
Arguments
- palette
Character value. Name of the palette.
- discrete
Logical value. If
TRUE, create a discrete color scale. IfFALSE, create a continuous color scale.- reverse
Logical value. If
TRUE, the palette is reversed.- ...
Additional arguments passed to
ggplot2::discrete_scale()orggplot2::scale_color_gradientn().
Details
scale_color_tscv() creates either a discrete or continuous color scale
for the color aesthetic.
For discrete variables, the function uses ggplot2::discrete_scale().
For continuous variables, it uses ggplot2::scale_color_gradientn().
Available palettes are "main", "cool", "hot",
"mixed", and "grey".
See also
Other data visualization:
plot_bar(),
plot_density(),
plot_histogram(),
plot_line(),
plot_point(),
plot_qq(),
scale_fill_tscv(),
theme_tscv(),
tscv_cols(),
tscv_pal()

