| scales_bde | R Documentation |
Color scales for ggplot2. Discrete scales are named
scale_*_bde_d; continuous scales are named scale_*_bde_c.
scale_color_bde_d(
palette = c("bde_vivid_pal", "bde_rose_pal", "bde_qual_pal"),
alpha = NULL,
rev = FALSE,
...
)
scale_fill_bde_d(
palette = c("bde_vivid_pal", "bde_rose_pal", "bde_qual_pal"),
alpha = NULL,
rev = FALSE,
...
)
scale_color_bde_c(
palette = c("bde_rose_pal", "bde_vivid_pal", "bde_qual_pal"),
alpha = NULL,
rev = FALSE,
guide = "colorbar",
...
)
scale_fill_bde_c(
palette = c("bde_rose_pal", "bde_vivid_pal", "bde_qual_pal"),
alpha = NULL,
rev = FALSE,
guide = "colorbar",
...
)
palette |
A BdE palette to apply. See |
alpha |
Alpha transparency level in the range |
rev |
Logical. If |
... |
Additional arguments passed to |
guide |
A function used to create a guide or its name. See
|
A ggplot2 scale object.
ggplot2::discrete_scale() and ggplot2::continuous_scale() for
the underlying scale constructors.
Plotting functions:
bde_tidy_palettes(),
theme_tidybde()
library(ggplot2)
set.seed(596)
txsamp <- subset(
txhousing,
city %in% c(
"Houston", "Fort Worth",
"San Antonio", "Dallas", "Austin"
)
)
ggplot(txsamp, aes(x = sales, y = median)) +
geom_point(aes(colour = city)) +
scale_color_bde_d() +
theme_minimal()
ggplot(txsamp, aes(x = sales, y = median)) +
geom_point(aes(colour = city)) +
scale_color_bde_d("bde_qual_pal") +
theme_minimal()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.