View source: R/scale-pattern-grey.R
scale_pattern_colour_grey | R Documentation |
Based on gray.colors()
. This is black and white equivalent
of scale_pattern_colour_gradient()
.
scale_pattern_colour_grey(
...,
start = 0.2,
end = 0.8,
na.value = "red",
aesthetics = "pattern_colour"
)
scale_pattern_fill_grey(
...,
start = 0.2,
end = 0.8,
na.value = "red",
aesthetics = "pattern_fill"
)
scale_pattern_fill2_grey(
...,
start = 0.2,
end = 0.8,
na.value = "red",
aesthetics = "pattern_fill2"
)
... , start , end , na.value , aesthetics |
See
|
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 = level),
pattern = 'stripe',
fill = 'white',
colour = 'black'
) +
theme_bw(18) +
scale_pattern_fill_grey()
plot(gg)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.