Re: Strange TITLE output using NG PLOT. [message #73822] |
Wed, 01 December 2010 15:44 |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Dec 1, 6:44 pm, alx <lecacheux.al...@wanadoo.fr> wrote:
> OVERPLOT in NG is not like OPLOT in DG: axes and labels are (re)drawn;
> only scale and range from first plot are kept. To ensure speed, you
> should use REFRESH=1 option :
Range is only preserved if the first plot had the x and y ranges
explicitly set. Otherwise it is recalculated (and possibly changed,
redrawing everything) on every overplot.
|
|
|
Re: Strange TITLE output using NG PLOT. [message #73827 is a reply to message #73822] |
Wed, 01 December 2010 13:58  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
alx wrote:
> OVERPLOT in NG is not like OPLOT in DG: axes and labels are (re)drawn;
> only scale and range from first plot are kept. To ensure speed, you
> should use REFRESH=1 option :
>
> x = findgen(100)
> y = (x/10.0)^3
> p = PLOT( x,y, TITLE='My x-y plot', XTITLE='x-axis', YTITLE='y-axis')
> p.Refresh, /DISABLE
> for i = 0, 31 do !Null = plot(x, y, OVERPLOT=p)
> p.Refresh
Brilliant! Thanks very much. That sped up the process greatly (and solved the title redraw issue too!). DG is still
faster but the 20second wait for NG that I whinged about in my original post is now a *much* less noticeable
large-fraction of a second.
All of the plot examples in the docs I looked at simply used OVERPLOT -- I didn't see any examples using the refresh
method (until I clicked on the method documentation itself after reading your post. D'oh!)
Merci beaucoup!
cheers,
paulv
|
|
|
Re: Strange TITLE output using NG PLOT. [message #73831 is a reply to message #73827] |
Wed, 01 December 2010 13:05  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
David Fanning wrote:
> Paul van Delst writes:
>
>> BTW, any interaction with my resulting plot is agonisingly slow. I.e. it took about 20seconds to render the
>> rubberband box and then redraw for a zoom in
>
> How do you get a rubberband box in this plot? Whenever
> I click inside the plot to draw a rubberband box,
> the whole damn plot moves on me. :-(
Yeah, it's an annoying default.
Hold down the shift key and the cursor should change from and hand to a magnifying glass. Now you can zoom.
cheers,
paulv
|
|
|
Re: Strange TITLE output using NG PLOT. [message #73832 is a reply to message #73831] |
Wed, 01 December 2010 13:01  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Paul van Delst writes:
> BTW, any interaction with my resulting plot is agonisingly slow. I.e. it took about 20seconds to render the
> rubberband box and then redraw for a zoom in
How do you get a rubberband box in this plot? Whenever
I click inside the plot to draw a rubberband box,
the whole damn plot moves on me. :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Strange TITLE output using NG PLOT. [message #73835 is a reply to message #73832] |
Wed, 01 December 2010 12:46  |
lecacheux.alain
Messages: 325 Registered: January 2008
|
Senior Member |
|
|
On 1 déc, 21:44, alx <lecacheux.al...@wanadoo.fr> wrote:
> On 1 déc, 21:10, Paul van Delst <paul.vande...@noaa.gov> wrote:
>
>
>
>
>
>> Hello,
>
>> I have the following NG plot code in a loop:
>
>> ; Begin detector loop
>> FOR i = 0, n_detectors-1 DO BEGIN
>
>> ....do some stuff here....
>
>> ; Plot the data detector by detector for inspection
>> IF ( Plot_Data ) THEN BEGIN
>> osrf->Get_Property, Frequency=f, Response=r
>> p = PLOT( f, r, $
>> TITLE=Sensor_Id+' ch.'+STRTRIM(Sensor_Channel[l],2), $
>> XTITLE='Frequency (cm!U-1!N)', $
>> YTITLE='Relative Response', $
>> COLOR=color[i MOD N_ELEMENTS(color)], $
>> OVERPLOT=i, $
>> /CURRENT )
>> ENDIF
>> ENDFOR ; Detector loop
>
>> This produces a plot (slowly, but surely) that contains all the necessary data. However, it would appear that the main
>> title is output again and again for each overplot. The x- and y-axis titles appear "normal", it's just the main plot
>> title that looks like a very thick magic marker was used to write it.
>
>> Here's a standalone example:
>
>> x = findgen(100)
>> y = (x/10.0)^3
>
>> for i = 0, 31 do p = PLOT( x,y, $
>> TITLE='My x-y plot', $
>> XTITLE='x-axis', $
>> YTITLE='y-axis', $
>> OVERPLOT=i, $
>> /CURRENT )
>
>> Watch the "My x-y plot" title get bolder/thicker with each overplot. If you zoom in, the title gets redrawn to the
>> correct weight. But, if you hit the "undo" button, you get the original heavy weight result.
>
>> Has anyone else experienced this strange phenomena? Is it something I'm doing wrong, or the PLOT() function?
>
>> cheers,
>
>> paulv
>
>> p.s. BTW, any interaction with my resulting plot is agonisingly slow. I.e. it took about 20seconds to render the
>> rubberband box and then redraw for a zoom in. My equivalent DG plot/overplot was almost instantaneous (to plot
>> initially, and to redraw when zooming in). The speed of NG redraws for "many" plots (in my case 32 with each plot
>> consisting of 10000's of points each) is embarrassing to behold. ITTVIS *has* to improve the performance of NG for it to
>> be taken seriously (and to any ITTVIS folks reading this, I *really* want to take it seriously). Otherwise it's just a
>> toy feature because its slowness makes it unusable for actual work. Sigh.
>
>> E.g. try the above standalone example, but with
>> x = findgen(50000)
>> y = (x/5000.0)^3
>> Maybe it's my machine or setup, but I can go get a coffee and it'll still be drawing when I get back.
>
> OVERPLOT in NG is not like OPLOT in DG: axes and labels are (re)drawn;
> only scale and range from first plot are kept. To ensure speed, you
> should use REFRESH=1 option :
>
> x = findgen(100)
> y = (x/10.0)^3
>
> p = PLOT( x,y, TITLE='My x-y plot', XTITLE='x-axis', YTITLE='y-
> axis'))
> for i = 0, 31 do- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -
x = findgen(100)
y = (x/10.0)^3
p = PLOT( x,y, TITLE='My x-y plot', XTITLE='x-axis', YTITLE='y-axis')
p.Refresh, /DISABLE
for i = 0, 31 do !Null = plot(x, y, OVERPLOT=p)
p.Refresh
|
|
|
Re: Strange TITLE output using NG PLOT. [message #73836 is a reply to message #73835] |
Wed, 01 December 2010 12:44  |
lecacheux.alain
Messages: 325 Registered: January 2008
|
Senior Member |
|
|
On 1 déc, 21:10, Paul van Delst <paul.vande...@noaa.gov> wrote:
> Hello,
>
> I have the following NG plot code in a loop:
>
> ; Begin detector loop
> FOR i = 0, n_detectors-1 DO BEGIN
>
> ....do some stuff here....
>
> ; Plot the data detector by detector for inspection
> IF ( Plot_Data ) THEN BEGIN
> osrf->Get_Property, Frequency=f, Response=r
> p = PLOT( f, r, $
> TITLE=Sensor_Id+' ch.'+STRTRIM(Sensor_Channel[l],2), $
> XTITLE='Frequency (cm!U-1!N)', $
> YTITLE='Relative Response', $
> COLOR=color[i MOD N_ELEMENTS(color)], $
> OVERPLOT=i, $
> /CURRENT )
> ENDIF
> ENDFOR ; Detector loop
>
> This produces a plot (slowly, but surely) that contains all the necessary data. However, it would appear that the main
> title is output again and again for each overplot. The x- and y-axis titles appear "normal", it's just the main plot
> title that looks like a very thick magic marker was used to write it.
>
> Here's a standalone example:
>
> x = findgen(100)
> y = (x/10.0)^3
>
> for i = 0, 31 do p = PLOT( x,y, $
> TITLE='My x-y plot', $
> XTITLE='x-axis', $
> YTITLE='y-axis', $
> OVERPLOT=i, $
> /CURRENT )
>
> Watch the "My x-y plot" title get bolder/thicker with each overplot. If you zoom in, the title gets redrawn to the
> correct weight. But, if you hit the "undo" button, you get the original heavy weight result.
>
> Has anyone else experienced this strange phenomena? Is it something I'm doing wrong, or the PLOT() function?
>
> cheers,
>
> paulv
>
> p.s. BTW, any interaction with my resulting plot is agonisingly slow. I.e. it took about 20seconds to render the
> rubberband box and then redraw for a zoom in. My equivalent DG plot/overplot was almost instantaneous (to plot
> initially, and to redraw when zooming in). The speed of NG redraws for "many" plots (in my case 32 with each plot
> consisting of 10000's of points each) is embarrassing to behold. ITTVIS *has* to improve the performance of NG for it to
> be taken seriously (and to any ITTVIS folks reading this, I *really* want to take it seriously). Otherwise it's just a
> toy feature because its slowness makes it unusable for actual work. Sigh.
>
> E.g. try the above standalone example, but with
> x = findgen(50000)
> y = (x/5000.0)^3
> Maybe it's my machine or setup, but I can go get a coffee and it'll still be drawing when I get back.
OVERPLOT in NG is not like OPLOT in DG: axes and labels are (re)drawn;
only scale and range from first plot are kept. To ensure speed, you
should use REFRESH=1 option :
x = findgen(100)
y = (x/10.0)^3
p = PLOT( x,y, TITLE='My x-y plot', XTITLE='x-axis', YTITLE='y-
axis'))
for i = 0, 31 do
|
|
|