[R] Display time of PDF plots

David L Carlson dc@r|@on @end|ng |rom t@mu@edu
Mon Sep 3 20:36:42 CEST 2018

If the plot is being displayed on a monitor, it is being bitmapped to the resolution of the display device regardless of how you save it. Most computer monitors are about 100dpi.

If the problem is that the points are overprinting, Bert's suggestion to use hexbin() is the way to go.

If the points are not substantially overprinting, you could just save the plot in raster format using an lzh compressed tif() or png() to the maximum likely resolution of the display device (take zooming into account by going up to 600dpi or 1200dpi, for example). Don't use jpg since it is lossy and you will get halos when you zoom in. 

You can always preserve a vector version for publication. If you have Adobe Acrobat (not Reader), you can Save As Other | Image | tiff (or png) and set the resolution before exporting.

David L. Carlson
Department of Anthropology
Texas A&M University

-----Original Message-----
From: R-help [mailto:r-help-bounces using r-project.org] On Behalf Of Rich Shepard
Sent: Monday, September 3, 2018 12:45 PM
To: r-help using r-project.org
Subject: [R] Display time of PDF plots

   This may be an inappropriate forum for this question. If so, please point
me in a better direction.

   A current project includes scatter plots with thousands of points. Saved
as PDF files they display slowly using a pdf viewer or when included in the
PDF output of a LaTeX document.

   Is there a process by which these plots can be 'thinned' so they show the
same overall patterns but with fewer points so they display more quickly?

   Rasterizing them to .jpg files using 'convert' allows them to load
immediately, but the bit-mapped resolution is, of course, much lower than
the vector PDF format.


R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list