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. 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? Thanks! Seth -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
I tried the following commands with R1.6.0 on Win2K:> x <- 1:1000000 > system.time(plot(x,x,pch="."))The plot took about 28s on my PIII. This seems okay for 1000000 points. By any chance are you an author of Igor :-) Regards, Andrew C. Ward CAPE Centre Department of Chemical Engineering The University of Queensland Brisbane Qld 4072 Australia andreww at cheque.uq.edu.au Quoting Seth Northrop <seth at reflectivity.com>:> > 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. > > 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? > > Thanks! > Seth > > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-> 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 >_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. _._._._._>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Fri, Oct 25, 2002 at 11:24:42AM +1000, Andrew C. Ward wrote:> I tried the following commands with R1.6.0 on Win2K: > > > x <- 1:1000000 > > system.time(plot(x,x,pch=".")) > > The plot took about 28s on my PIII. This seems okay for 1000000 > points. By any chance are you an author of Igor :-)FWIW 2.96s on my Athlon running Linux is even better. -- Good judgement comes from experience; experience comes from bad judgement. -- Fred Brooks -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
And ca. 28 seconds on my PIII box, also with R.1.6.0 and Win2K; 24 seconds when I turned the CD player off... MJM Andrew C. Ward wrote:> I tried the following commands with R1.6.0 on Win2K: > > >>x <- 1:1000000 >>system.time(plot(x,x,pch=".")) > > > The plot took about 28s on my PIII.Michael J. Manning National Institute of Water and Atmospheric Research Ltd PO Box 14901, Kilbirnie Wellington, New Zealand Tel 64 4 386 0581 Fax 64 4 386 0574 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._