Open
Description
It's possible this related to (or a dupe of) #166 ...
Example code:
dats <- split(mtcars, ~ cyl)
ggs <- lapply(dats, function(dat) free(ggplot(dat, aes(mpg, disp)) + geom_point() + geom_vline(xintercept = 18)))
des <- do.call(c, Map(function(x, i) area(l=min(c(18, x$mpg)), r=max(c(18, x$mpg)), t=i, b=i), dats, seq_along(dats)))
des
# 3 patch areas, spanning 33 columns and 3 rows
# t l b r
# 1: 1 18 1 33
# 2: 2 17 2 21
# 3: 3 10 3 19
Reduce(`/`, ggs) + plot_layout(design = des)
Is it possible to align the plots so that the vlines (all at 18) are aligned? In this example, I'd like to not extend all scales to the max range of values. (I've tried free(type=)
variants, no significant improvement.)
Metadata
Metadata
Assignees
Labels
No labels