[R] Managing size of plots with many points

Ott Toomet otoomet at econ.dk
Fri Feb 21 10:17:09 CET 2003


Hi,

 | What is available to limit obvious overplotting, e.g. with a million 
 | points?  My primary motivation is to produce plots from R and S-Plus 
 | that occupy minimal hard drive space without sacrificing visual clarity. 
 |   (I've crashed MicroSoft PowerPoint by including plots that are too big.)
 | 
 | Right now, I can think of three different scenarios:
 | 
 | 	  1.  Monotonic applications such as a normal probability plot.
 | 
 | 	  2.  Lines (or connected dots).
 | 
 | 	  3.  General scatterplots.
 | 
 | Several approaches have been suggested, and I've implemented an ugly 
 | algorithm.  However, I believe something better should be available, but 
 | I don't even know what words to use in a search.

These issues have been discussed occasionally here in the list.  Some
options I remember where:

If you consider only about storage space, then PNG output may be a
choice.

Use contour plot or another way to smooth the density and plot it
e.g. as persp.

Use smoothed density in order to drop part of your points (drop more
points where the density is higher).


Perhaps it helps.

Ott




More information about the R-help mailing list