UNHCR ggplot2 color scales
scale_color_unhcr_c(
...,
type = "sequential",
palette = 1,
direction = 1,
na.value = "#E9E9E9",
guide = "colourbar"
)scale_color_unhcr_d(
...,
type = "qualitative",
palette = 1,
direction = 1,
nmax = NULL,
order = NULL,
na.value = "#E9E9E9"
)
scale_color_unhcr_b(
...,
type = "qualitative",
palette = 1,
direction = 1,
nmax = NULL,
order = NULL,
na.value = "#E9E9E9",
guide = "coloursteps"
)
scale_colour_unhcr_c(
...,
type = "sequential",
palette = 1,
direction = 1,
na.value = "#E9E9E9",
guide = "colourbar"
)
scale_colour_unhcr_d(
...,
type = "qualitative",
palette = 1,
direction = 1,
nmax = NULL,
order = NULL,
na.value = "#E9E9E9"
)
scale_colour_unhcr_b(
...,
type = "qualitative",
palette = 1,
direction = 1,
nmax = NULL,
order = NULL,
na.value = "#E9E9E9",
guide = "coloursteps"
)
scale_fill_unhcr_c(
...,
type = "sequential",
palette = 1,
direction = 1,
na.value = "#E9E9E9",
guide = "colourbar"
)
scale_fill_unhcr_d(
...,
type = "qualitative",
palette = 1,
direction = 1,
nmax = NULL,
order = NULL,
na.value = "#E9E9E9"
)
scale_fill_unhcr_b(
...,
type = "qualitative",
palette = 1,
direction = 1,
nmax = NULL,
order = NULL,
na.value = "#E9E9E9",
guide = "coloursteps"
)
A discrete, continuous or binned Scale
object
Other arguments passed on to
discrete_scale
or
continuous_scale
to control name, limits, breaks, labels and so forth
One of \"sequential\", \"diverging\" or \"qualitative\"
If a string, will use that named palette. If a number, will
index into the list of palettes of appropriate type
Sets the order of colors in the scale. If 1, the default,
colors are as output by unhcr_pal()
. If -1, the order of colors is reversed
Missing values will be replaced with this value.
A function used to create a guide or its name. See
guides()
for more information.
Maximum number of different colors the palette should contain. If not provided, is calculated automatically from the data.
Numeric vector listing the order in which the colors
should be used. Default is 1:nmax
.
library(ggplot2)
data(msleep, package = "ggplot2")
ggplot(msleep, aes(vore, sleep_total, fill = vore)) +
geom_boxplot() +
scale_fill_unhcr_d(palette = 1, direction = -1)
Run the code above in your browser using DataLab