scale_craftbrewer | R Documentation |
extended brewer palettes
extended brewer palettes
scale_fill_craftfermenter(
...,
type = "seq",
palette = 1,
direction = -1,
na.value = "grey50",
guide = "coloursteps",
aesthetics = "fill"
)
scale_color_craftfermenter(
...,
type = "seq",
palette = 1,
direction = -1,
na.value = "grey50",
guide = "coloursteps",
aesthetics = "color"
)
type |
one of "seq", "div" or "qual" |
palette |
which brewer palette |
direction |
reverses direction, 1 or -1 |
library(ggplot2)
ggplot(mtcars, aes(mpg, disp, fill = hp)) +
geom_point(shape = 21) +
scale_fill_craftfermenter(
breaks = seq(0,520,40),
limits = c(0,520),
palette = "Spectral",
guide= guide_colorsteps(even.steps = FALSE, # workaround for issues #4019/#4100
barheight = 15)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.