scale_color_hdx_discrete {gghdx} | R Documentation |
HDX color scales
Description
Color scales using the HDX palette. For discrete color scales, the
scale_color_hdx_...()
and scale_fill_hdx_...()
family of functions are
available. For gradient scales, use scale_color_gradient_hdx()
and
scale_fill_gradient_hdx()
functions for a single color scale or
scale_..._gradient2...()
alternative.
Usage
scale_color_hdx_discrete(na.value = hdx_hex("gray-light"), ...)
scale_colour_hdx_discrete(na.value = hdx_hex("gray-light"), ...)
scale_color_hdx_gray(na.value = hdx_hex("tomato-hdx"), ...)
scale_colour_hdx_gray(na.value = hdx_hex("tomato-hdx"), ...)
scale_colour_hdx_grey(na.value = hdx_hex("tomato-hdx"), ...)
scale_color_hdx_grey(na.value = hdx_hex("tomato-hdx"), ...)
scale_color_hdx_mint(na.value = hdx_hex("gray-light"), ...)
scale_colour_hdx_mint(na.value = hdx_hex("gray-light"), ...)
scale_color_hdx_sapphire(na.value = hdx_hex("gray-light"), ...)
scale_colour_hdx_sapphire(na.value = hdx_hex("gray-light"), ...)
scale_color_hdx_tomato(na.value = hdx_hex("gray-light"), ...)
scale_colour_hdx_tomato(na.value = hdx_hex("gray-light"), ...)
scale_fill_hdx_discrete(na.value = hdx_hex("gray-light"), ...)
scale_fill_hdx_gray(na.value = hdx_hex("tomato-hdx"), ...)
scale_fill_hdx_grey(na.value = hdx_hex("tomato-hdx"), ...)
scale_fill_hdx_mint(na.value = hdx_hex("gray-light"), ...)
scale_fill_hdx_sapphire(na.value = hdx_hex("gray-light"), ...)
scale_fill_hdx_tomato(na.value = hdx_hex("gray-light"), ...)
scale_fill_gradient_hdx(na.value = "transparent", ...)
scale_fill_gradient_hdx_sapphire(na.value = "transparent", ...)
scale_fill_gradient_hdx_mint(na.value = "transparent", ...)
scale_fill_gradient_hdx_tomato(na.value = "transparent", ...)
scale_color_gradient_hdx(na.value = "transparent", ...)
scale_colour_gradient_hdx(na.value = "transparent", ...)
scale_color_gradient_hdx_sapphire(na.value = "transparent", ...)
scale_colour_gradient_hdx_sapphire(na.value = "transparent", ...)
scale_color_gradient_hdx_mint(na.value = "transparent", ...)
scale_colour_gradient_hdx_mint(na.value = "transparent", ...)
scale_color_gradient_hdx_tomato(na.value = "transparent", ...)
scale_colour_gradient_hdx_tomato(na.value = "transparent", ...)
scale_color_gradient2_hdx(na.value = "transparent", ...)
scale_colour_gradient2_hdx(na.value = "transparent", ...)
scale_fill_gradient2_hdx(na.value = "transparent", ...)
Arguments
na.value |
Colour to use for missing values |
... |
Arguments passed on to
|
Value
Relevant ggplot2 scale object to add to a ggplot2::ggplot()
plot,
either ggplot2::ScaleDiscrete
or ggplot2::ScaleContinuous
.
See Also
gghdx()
for setting default fill and color scaling,
along with other styling.
Examples
library(ggplot2)
# discrete scaling
p1 <- ggplot(iris) +
geom_point(
aes(
x = Sepal.Length,
y = Petal.Width,
color = Species
)
)
p1
p1 + scale_color_hdx_discrete()
p1 + scale_color_hdx_mint()
# use gradient scaling
p2 <- ggplot(iris) +
geom_point(
aes(
x = Sepal.Length,
y = Petal.Width,
color = Petal.Length
)
)
p2
p2 + scale_color_gradient_hdx_mint()
p2 + scale_color_gradient_hdx_tomato()