comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » 2 cent tip: Faster way to plot millions of points
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
2 cent tip: Faster way to plot millions of points [message #9497] Fri, 11 July 1997 00:00
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
Sometimes we need to plot spectra which contain millions of points. It
appears to be faster to use PLOTS (rather then PLOT).

Try the following:

n = 1000000L
x = lindgen(n)
y = sin(2.0*!pi*findgen(n)/(n-1))
t0 = systime(1.0) & plot,x,y & print,systime(1.0)-t0
t0 = systime(1.0) & plot,x,y,/nodata & plots,x,y & print,systime(1.0)-t0

On my SGI Power Indigo running IDL 5.0, it takes 21.43 sec for the first
plot, and 12.46 sec for the second plot. I observe similar speedups on
Linux (IDL 5.0) and Windows NT 3.51 (IDL 4.0.1).

Cheers,
Liam.
[Message index]
 
Read Message
Previous Topic: Giant arrays!
Next Topic: Best price on the net CD-R 74 Minute Gold $2.99 Retail package - no rebates no gimmics no surcharges

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:09:19 PDT 2025

Total time taken to generate the page: 0.00561 seconds