-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pagination of large facet plots #303
Comments
Thanks, this looks very useful, it definitely would be great to upstream the feature to AoG. About the API, OTOH, the current |
I considered that approach, the main issue I ran into with that approach, i.e. draw(layers; facet = (; paginate = true,)) # or something like that.. is that the return type changes from draw.(layers; kws...) or just wrap it all in a separate draw(
paginate(
layers;
limit = 4
)
) would just become paginate(layers; kws...) though that does end up forcing the keywords associated with (Edit: the added benefit of just processing the |
Ah, of course, I hadn't thought that the output type is different. Then it makes a lot of sense to wrap the input, I agree that the API proposed initially, ie |
pagination has existed for a while now |
When faceting a plot over a large number of columns/rows (or just wrapping with
layout
) the size of the plots can sometimes become quite unwieldy and requires manual intervention to increase the figure size or shrink the font size. Something that's a nice feature to have is pagination of faceted plots to reduce the amount of of axes that appear per-figure. There's a couple of options to do this with ggplot2:ggforce
andgridExtra
can handle this.The basic look of the API is instead of writing this:
we wrap the
Layer
withpaginate
:which just partitions the
.data
contained in theLayer
based on what's used inlayout
(orrow
andcol
).If there's interest in upstreaming this I'm happy to sort that out. Pagination has come in handy for a lot of our plotting needs in Pumas so I figured it may be more generally useful.
The text was updated successfully, but these errors were encountered: