I have a faceted plot with very diverse data. So some facets have only 1 x
value, but some others have 13 x
values. I know there is the parameter <
Ah yes very sad that functionality to set widths
and heights
in facet_grid
is gone.
Another possible workaround without ggplotGrob
is to set the text angle in theme(strip.text.x=element_text(angle...))
and facet text wrapping in facet_grid(... labeller=label_wrap_gen(width...))
, e.g.
ggplot(df, aes(x,y,color=i)) +
geom_point() +
facet_grid(labely~labelx, scales='free_x', space='free_x', labeller=label_wrap_gen(width = 10, multi_line = TRUE)) +
theme(strip.text.x=element_text(angle=90, hjust=0.5, vjust=0.5))