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

Home » Public Forums » archive » Re: IDL 8.0; difficulties with "New Graphics"
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL 8.0; difficulties with "New Graphics" [message #72521 is a reply to message #72517] Fri, 17 September 2010 13:12 Go to previous messageGo to previous message
joseandres is currently offline  joseandres
Messages: 2
Registered: September 2010
Junior Member
You should try to use the REFRESH method: "The Refresh method enables
and disables the refresh (drawing) of the graphics window. This method
is useful if you are doing a large number of graphics updates and you
do not want to see the intermediate steps."

Compare these two versions:

;;; Slow version
b = barplot(/test)
for i=0, 20 do begin
color = [randomu(seed,1)*255, randomu(seed,1)*255, randomu(seed,
1)*255]
!null = barplot(/test, /overplot, transparency=50, color=color,
fill_color=color)
endfor


;;; Faster version
b = barplot(/test)
b.refresh, /DISABLE ; Disable re-draws.
for i=0, 20 do begin
color = [randomu(seed,1)*255, randomu(seed,1)*255, randomu(seed,
1)*255]
!null = barplot(/test, /overplot, transparency=50, color=color,
fill_color=color)
endfor
b.refresh ; Re-enable drawing and show the results.


-joseandres
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Renaming tags in an array of structures
Next Topic: half-point thickness

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

Current Time: Fri Oct 10 01:43:59 PDT 2025

Total time taken to generate the page: 1.19723 seconds