Plot optimization [Was: Re: [R] Plotting Speed: R vs Octave]

Matej Cepl matej at ceplovi.cz
Tue Dec 3 22:36:03 CET 2002


Deepayan Sarkar wrote:
> Also, wireframe code is currently far from optimized (it makes
> a separate R level function call to draw each quadrilateral).
> It would be more interesting to know why (and how much) persp
> is slower.

On somehow different note. I have asked couple of days ago about
possibility of optimalization of plotting functions (pairs
function created for me 0.5MB pictures). Answer was more or less
unsatisfactory. I do not want bother you about that again, but
I have took a look at the EPS file itself and this is what
I found these interesting lines

	% these are definitions
	/c { newpath 0 360 arc } def
	/p1  { stroke } def

	% and than there is a many thousand
	% lines like these (something around 80k to be exact)
	
	330.89 387.93 1.63 c p1
	330.89 377.14 1.63 c p1
	330.89 377.14 1.63 c p1
	330.89 387.93 1.63 c p1
	330.89 387.93 1.63 c p1

If I understand well these lines use procedure /c for drawing
a circle in particular positions, many times overplotting
previously already drawn points (statistically speaking, not
points in terms of pixels).

PDF file created with these pictures prettly certainly kicked
down any laser printer I was pushing it through. Do you think,
that it would not be possible somehow to optimize PostScript
coming from R (at least to avoid overplotting by calling exactly
the same procedure at exactly same points)?

The example file is attached.

Matej

-- 
Matej Cepl, matej at ceplovi.cz,
Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
 
There is no reason to suppose that most human beings are engaged
in maximizing anything unless it be unhappiness, and even this
with incomplete success.
    -- Ronald Coase
       Introduction to ``The Firm, the Market, and the Law''

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pairs-noscj.eps.bz2
Type: application/octet-stream
Size: 24591 bytes
Desc: not available
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20021203/e4169137/pairs-noscj.eps.obj


More information about the R-help mailing list