strip_vanilla {ggh4x} | R Documentation |
Default strips
Description
Strips with the style of vanilla ggplot2.
Usage
strip_vanilla(clip = "inherit", size = "constant")
Arguments
clip |
A |
size |
A |
Value
A Strip
ggproto object that can be used ggh4x facets.
See Also
Other strips:
strip_nested()
,
strip_split()
,
strip_themed()
Examples
# Some dummy data with a long string
df <- data.frame(
short = "X",
long = "A very long string that takes up a lot of space",
value = 1
)
# Simple plot
p <- ggplot(df, aes(value, value)) +
geom_point() +
theme(strip.text.y.right = element_text(angle = 0))
# Short titles take up as much space as long titles
p + facet_grid2(
vars(short, long),
strip = strip_vanilla(size = "constant")
)
# Short titles take up less space
p + facet_grid2(
vars(short, long),
strip = strip_vanilla(size = "variable")
)
[Package ggh4x version 0.2.8 Index]