Description Usage Arguments Examples
These create a binned gradient of colors based on the high and low value of a given hue from within the list of Sage branded colors.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | scale_colour_sage_b(
...,
option = "royal",
low = NULL,
high = NULL,
na.value = "grey50",
guide = "colourbar",
aesthetics = "colour"
)
scale_fill_sage_b(
...,
option,
low = NULL,
high = NULL,
na.value = "grey50",
guide = "colourbar",
aesthetics = "fill"
)
|
... |
Options passed to |
option |
One of the Sage colors. See |
low |
Colours for low and high ends of the gradient. |
high |
Colours for low and high ends of the gradient. |
na.value |
Colour to use for missing values |
guide |
Type of legend. Use |
aesthetics |
Character string or vector of character strings listing the
name(s) of the aesthetic(s) that this scale works with. This can be useful, for
example, to apply colour settings to the |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library("ggplot2")
df_na <- data.frame(
value = seq(1, 20),
x = runif(20),
y = runif(20),
z1 = c(rep(NA, 10), rnorm(10))
)
ggplot(df_na, aes(x, y)) +
geom_point(aes(colour = z1)) +
scale_colour_sage_b(option = "apple")
ggplot(faithfuld, aes(waiting, eruptions, fill = density)) +
geom_tile() +
scale_fill_sage_b(option = "powder")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.