[R] Postscript query: plotting long vectors
(Ted Harding)
Ted.Harding at nessie.mcc.ac.uk
Thu May 29 20:00:38 CEST 2003
On 29-May-03 Stephen Eglen wrote:
> t <- seq(from=0, to=4*pi, length=200000)
> y <- sin(t)
> postscript(file="o.ps")
> plot(t, y, type="l")
> dev.off()
>
> If I view the postscript file o.ps in "gv", it takes many seconds
> before eventually the axes appear, but then only one vertical line is
> drawn within the plot area -- there is no sine curve. (this is on a
> fast dual processor linux machine with 2Gb RAM.) This is clearly a
> postscript problem, rather than a R problem, since reducing the length
> of t down to something like 2000 solves the problem. By looking at
> the file o.ps it looks like the line is drawn by one "rlineto" call
> per point, followed eventually by a "stroke" after the last point.
> I'm guessing that the postscript interpreter simply cannot remember so
> many points in the path before it gets to the stroke.
Absolutely no problem here: beautiful sine curve, axes and all (gv-3.5.8
of June 1997, R-1.6.2, medium-speed 733MHz single processor with 512MB RAM
running Linux; 15 seconds to draw the curve; 'gs' 5.5 took about 5 secs).
At a guess your 'gv' is not coping. It's not a PS problem as such.
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 167 1972
Date: 29-May-03 Time: 19:00:38
------------------------------ XFMail ------------------------------
More information about the R-help
mailing list