[R] the huge postscript plot

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat Jul 5 08:59:26 CEST 2003


On Fri, 4 Jul 2003, Yongchao Ge wrote:

> Hi,
> 
> I'm just wondering how I can do to make a huge postscript plot be
> manageable. My question is that I have to draw around 60,000 points which
> makes it painfully slow to print or view in gv or put it into latex
> document, though it is very fast to produce the postscript file.
> 
> A simple example is in the attachment.
> 
> Well, I found that if I use png or jpeg. It is much faster to view
> the figure. The only problem is that the x label, y label are using
> bitmapped font so it doesn't look as beautiful as postscript. Sometimes it
> is just hard to read the legend which consists of information how to
> interpret the figure.

Only if scaling is involved: try setting the resolution so you view it at 
1:1.

> My question is that if there are some options or packages such that when
> we are plotting many points or lines, the plot uses the bitmapped (raster)
> format, but for the characters, like the x label, y label, and the title,
> it uses the native font.
> 
> pdf seems use the above approach and is very fast, but I have to use

It doesn't use that approach: PDF is primarily a vector format, and that's
what R's pdf() driver produces.

> pdf2ps to convert the pdf file to ps file. It is still slow. If you know
> other good converter of pdf file to ps file, i will also very appreciate
> it.

Which points up that the problem is in your .ps viewer, nowhere else.
That's not surprising; postscript is a *print* description language and
primarily intended for high-quality printing.  For a long time postscript
printers contained more powerful processors than workstations (let alone
PCs).  Your example is not `painfully slow' on my printer (nor to view 
with ghostscript, to give due credit to the engine behind gv), but it is 
also not an interesting plot, nor is it `huge'.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list