View source: R/scale-pattern-colour.R
scale_pattern_colour_continuous | R Documentation |
See ggplot2::scale_colour_continuous()
for more information
scale_pattern_colour_continuous(
...,
type = getOption("ggplot2.continuous.colour", default = "gradient")
)
scale_pattern_fill_continuous(
...,
type = getOption("ggplot2.continuous.fill", default = "gradient")
)
scale_pattern_fill2_continuous(
...,
type = getOption("ggplot2.continuous.fill", default = "gradient")
)
... |
Additional parameters passed on to the scale type |
type |
One of "gradient" (the default) or "viridis" indicating the colour scale to use |
A ggplot2::Scale object.
if (require("ggplot2")) {
df <- data.frame(level = c("a", "b", "c", "d"),
outcome = c(2.3, 1.9, 3.2, 1))
gg <- ggplot(df) +
geom_col_pattern(
aes(level, outcome, pattern_fill = outcome),
pattern = 'stripe',
fill = 'white',
colour = 'black'
) +
theme_bw(18) +
scale_pattern_fill_continuous()
plot(gg)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.