Skip to content
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

New feature to allow ggsave to save multiple plots to separate pages of pdf #5093

Open
mpage21 opened this issue Dec 7, 2022 · 3 comments
Open
Labels
feature a feature request or enhancement

Comments

@mpage21
Copy link

mpage21 commented Dec 7, 2022

It would be super great if ggsave() could save multiple plots to the same pdf (on different pages).

I think ideally, the plot argument would be able to be passed a list. Same with the width and height, so that you can specify that for each plot.

@teunbrand teunbrand added the feature a feature request or enhancement label Dec 24, 2022
@elipousson
Copy link

For what it is worth, I have a ggsave() wrapper function called map_ggsave_ext() in my maplayer package that does this. I'm using gridExtra::arrangeGrob() or qpdf::pdf_combine() (depending on whether the plot is created using patchwork which is incompatible with the gridExtra method). It would be great to see something similar incorporated into ggsave.

@harinilakshminarayanan
Copy link

Is there an update to do this now, using ggsave() ?

@teunbrand
Copy link
Collaborator

This hasn't been implemented yet. I've played around with this, but as far as I can see it is not so difficult to do this, but the difficulty lies with doing it cleanly and with backward compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

4 participants