[R] pdf device: rasterize portions of the plot to reduce file size

2008-11-20 Thread baptiste auguie
Dear list, My favorite output format is usually pdf. I can include the graphics in pdflatex documents and benefit from the scalable nature of vector graphic formats. However, I recently had to generate high-res 2D levelplot graphics as in the example below, N - 100 # N - 1000 # slow to

Re: [R] pdf device: rasterize portions of the plot to reduce file size

2008-11-20 Thread Stefan Evert
With N=1000, this approach produces a hefty pdf file of ~29MB, while the png file with default resolution is only 72kB. It is clear that I don't want to include the pdf figure in a manuscript, as most pdf readers (let alone the printer) will painfully stall when scrolling down the

Re: [R] pdf device: rasterize portions of the plot to reduce file size

2008-11-20 Thread baptiste auguie
Thanks for your comment. I would typically follow this approach too, but I'm wondering whether one could find a more sophisticated solution. Ideally, I'd like to be able to select the text that is annotating the figure. There are very few cases where I can see a real need for raster text,