5

Hello everybody out there using R,

When putting multiple plots with thousands of data points into a single PDF file, this file can get huge and take a long time to open.

The following post describes exactly the same problem in Matplotlib, as well as a nice fix for it: Matplotlib: multipage PDF with rasterized plots Particularly nice about it is, that it only rasterizes the points without rasterizing the labels. http://www.astrobetter.com/blog/2014/01/17/slim-down-your-bloated-graphics/ contains a nice example of it.

I am now looking for a similar solution in R.

NicolasBourbaki
  • 853
  • 1
  • 6
  • 19
  • There are some useful hints on https://stackoverflow.com/questions/8048984/plot-as-bitmap-in-pdf?rq=1 – NicolasBourbaki Jan 29 '18 at 09:17
  • Further potentially helpful information information can also be found in https://stackoverflow.com/questions/8048984/plot-as-bitmap-in-pdf – NicolasBourbaki Jan 29 '18 at 11:29
  • https://stackoverflow.com/questions/7597081/combining-vector-and-bitmap-graphics-in-a-pdf?noredirect=1&lq=1 comes very close, but as the other threads it treats raster images and not plots – NicolasBourbaki Jan 29 '18 at 13:50
  • 1
    https://stackoverflow.com/questions/47222764/how-to-rasterize-a-single-layer-of-a-ggplot also goes in a very similar direction, but for ggplot2 – NicolasBourbaki Jan 29 '18 at 17:51
  • https://stackoverflow.com/questions/42058059/rasterise-ggplot-images-in-r-for-tikzdevice/42059772#42059772 provides a solution for ggplot2. The results is actually excatly what I would like to achieve with base graphics, but the way to get there is not straightforward. – NicolasBourbaki Jan 29 '18 at 17:51

0 Answers0