how can i save ggplots in pdf in size r?

Observing the documentation of pdf(), it’s parameters seem to be compatible with ggsave().

I found a parameter which is useDingbats, by default it is set to FALSE but If you set it to TRUE, the PDF size reduces drastically from 94 MB to 10 MB in my case.

So I use it like this:

ggsave("myplots.pdf", arrangedPlots, useDingbats = TRUE)

NOTE: setting useDingbats to true what does is using Dinbats font for small circles, which in case of the scatter plots and boxplots with lots of outlier points reduces the size of final PDF a lot.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top