Re: Relationship between IDLgrXXXX and associated NG functions. Was: IDL documentation gripe - How to erase a new graphics window? [message #80119 is a reply to message #80117] |
Tue, 01 May 2012 11:51   |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 5/1/12 8:32 AM, Paul van Delst wrote:
> 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.
Do you really need to erase everything?
IDL> p = plot(findgen(100))
IDL> p->setData, (findgen(100)^2)/1000.0
Or if you want to change a bunch of stuff at once:
IDL> p = plot(findgen(100))
IDL> p->refresh, /disable
IDL> p->setData, (findgen(100)^2)/1000.0
IDL> p.title = 'New title'
; ... set more properties ...
IDL> p->refresh
Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL, A Guide to Learning IDL: http://modernidl.idldev.com
Research Mathematician
Tech-X Corporation
|
|
|