scale_color_profinit {profiplots} | R Documentation |
Profinit color scale constructor
Description
Profinit color scale constructor
scale_color_profinit_d
- Discrete Profinit color scale (similar to
scale_color_viridis_d
). It can't be used with continuous variables. There
is BrE equivalent, too: scale_colour_profinit_d
.
scale_color_profinit_c
- Continuous Profinit color scale (similar to
scale_color_viridis_c
). It can't be used with discrete variables. There is
BrE equivalent, too: scale_colour_profinit_c
.
Usage
scale_color_profinit(
palette = "blue-red",
discrete = TRUE,
reverse = FALSE,
exact = NULL,
na.value = NULL,
...
)
scale_colour_profinit(
palette = "blue-red",
discrete = TRUE,
reverse = FALSE,
exact = NULL,
na.value = NULL,
...
)
scale_color_profinit_d(palette = "blue-red", ...)
scale_colour_profinit_d(palette = "blue-red", ...)
scale_color_profinit_c(palette = "blue-red", ...)
scale_colour_profinit_c(palette = "blue-red", ...)
Arguments
palette |
Character name of palette in |
discrete |
Boolean indicating whether color aesthetic is discrete or not. Defaults to |
reverse |
Boolean indicating whether the palette should be reversed. Defaults to |
exact |
Indicates whether the color scale is supposed to be followed exactly.
Be ware you may run out of colors. Defaults to |
na.value |
What value is going to be used for missings. Defaults to profinit's grey with some transparency added. |
... |
Additional arguments passed to |
Value
Ggplot2 color scale constructor based on Profinit color palette.
Examples
library(ggplot2)
iris_plt <- ggplot(iris, aes(x = Sepal.Width, y = Sepal.Length, color = Species)) +
geom_point() +
theme_profinit()
iris_plt + scale_color_profinit()
# Now, let's use another Profinit palette:
# (see `profinit_pal.pals()` for all the options)
iris_plt + scale_color_profinit(palette = "reds-dark")