[R] plot slow?

Thomas Lumley tlumley at u.washington.edu
Fri Oct 25 17:44:30 CEST 2002


On Thu, 24 Oct 2002, Seth Northrop wrote:

>
> Hi,
>
> I just installed R and am comparing it to other packages (such as Igor).
> So, you'll have to excuse me if this is a stupid question.  I run the
> simple command:
>
> plot(1:1000000)
>
> And it seems SO slow!  Igor blasts through this.

It is fairly slow, but as my screen only has about a million pixels it's
unusual that I want to plot a million points on it.  It's even slower (of
course)  over an X-Windows link.  Part of the problem is the need for a
portable interface to the graphics driver.

When it's really painfully slow is drawing a finely detailed image plot.

> My theory is that R is redrawing the screen for every point that's being
> graphed.  Is it possible to control how often R redraws a plot as its
> building it - or, is there some other trick here to speeding up plots with
> lots of points?

Your theory is wrong.

There is probably room for optimisation in the graphics code, but it
isn't a terribly high priority.  The main place where improvement is
planned is in the redrawing of the screen when the graphics window is
uncovered.

	-thomas

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list