Re: Relationship between IDLgrXXXX and associated NG functions. Was: IDL documentation gripe - How to erase a new graphics window? [message #80122 is a reply to message #80121] |
Tue, 01 May 2012 07:32   |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
Crikey, even the erase method doesn't work. And by "work" I mean according to:
> e·rase/iˈrās/
> Verb:
> Rub out or remove (writing or marks).
> Remove all traces of.
If I do this:
IDL> w=window()
% Loaded DLM: XML.
IDL> p=plot(lindgen(100),/current)
IDL> w.erase
IDL> p=plot((findgen(100)^2)/1000.0,/current)
The first plot, which I erased, reappears! ARGHHHH!
Is this a known bug or a "feature"?
IDL> print, !version
{ x86 linux unix linux 8.1 Mar 9 2011 32 64}
Does anyone know what is the sequence of commands to do what I would like to do? That is:
1) plot some data in the current window
2) erase the plot in the current window (data, axes, titles, everything)
3) plot some different data in that same, current window.
3a) And not have the original plot reappear.
not-so-cheerily yours,
paulv
p.s. Let me double check something:
IDL> help, !PI
<Expression> FLOAT = 3.14159
phewph.
On 05/01/12 10:06, Paul van Delst wrote:
> Hello,
>
> I've started replacing the DG draw widgets in my widget apps with NG window widgets. The way I use a particular app was
> to plot different things based on a selection from a button group. In DG there's no worries - you just call plot and the
> erase happens automagically and the new plot appears. But in NG the plots just pile on top of each other. I've searched
> the IDL documentation for the PLOT() and WINDOW() functions but there doesn't appear to be an "Erase" method.
>
> However, when I look at the IDLgrWindow window documentation there is the Erase method listed.
>
> Which does work with the window created using Window(),e.g.
>
> IDL> w=window()
> % Loaded DLM: XML.
> IDL> p=plot(indgen(100),current=w)
> IDL> w.erase
>
> So, does this mean ALL IDLgrXXXX methods work with the associated NG functions (e.g. IDLgrPlot for PLOT(), IDLgrSurface
> for SURFACE() etc)?
>
> And what about vice-versa?
>
> cheers,
>
> paulv
>
|
|
|