strip_vanilla {ggh4x} | R Documentation |
Strips with the style of vanilla ggplot2.
strip_vanilla(clip = "inherit", size = "constant")
clip |
A |
size |
A |
A Strip
ggproto object that can be used ggh4x facets.
Other strips:
strip_nested()
,
strip_split()
,
strip_themed()
# 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") )