scale_custom | R Documentation |
Custom coloring and filling functions based on unique color palettes
scale_color_unibas_d(palette = "unibas", extend = FALSE, ...)
scale_colour_unibas_d(palette = "unibas", extend = FALSE, ...)
scale_fill_unibas_d(palette = "unibas", extend = FALSE, ...)
scale_color_unibas_op(
palette = "unibas",
val_names = c("good", "neutral", "bad"),
...
)
scale_colour_unibas_op(
palette = "unibas",
val_names = c("good", "neutral", "bad"),
...
)
scale_fill_unibas_op(
palette = "unibas",
val_names = c("good", "neutral", "bad"),
...
)
scale_color_unibas_div(palette = "unibas", ...)
scale_colour_unibas_div(palette = "unibas", ...)
scale_fill_unibas_div(palette = "unibas", ...)
scale_color_unibas_c(palette = "unibas", ...)
scale_colour_unibas_c(palette = "unibas", ...)
scale_fill_unibas_c(palette = "unibas", ...)
palette |
Name of color palette |
extend |
Whether to extend discrete color palette to make sufficient colors for levels needed |
... |
Additional arguments to be passed to internal scale function |
val_names |
For opinionated scales, defaults to "good", "neutral", "bad" |
Specific functions include:
scale_(color/colour/fill)_unibas_d
: Discrete palette with either fixed or dynamically extended number of shades
scale_(color/colour/fill)_unibas_op
\
: Discrete palette with fixed colors for "good", "bad", and "neutral"
scale_(color/colour/fill)_unibas_div
: Continuous diverging color palette, must contain negative, neutral, positive values
scale_(color/colour/fill)_unibas_c
: Continuous color palette
library(ggplot2)
library(instools)
ggplot(diamonds[1:2000,], aes(x = cut, y = carat,
color = cut)) +
geom_point() +
scale_color_unibas_d()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.