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

Home » Public Forums » archive » Re: Relationship between IDLgrXXXX and associated NG functions. Was: IDL documentation gripe - How to erase a new graphics window?
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: Relationship between IDLgrXXXX and associated NG functions. Was: IDL documentation gripe - How to erase a new graphics window? [message #80116 is a reply to message #80109] Tue, 01 May 2012 13:07 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Hello,

On 05/01/12 14:33, Chris Torrence wrote:
> On Tuesday, May 1, 2012 8:48:33 AM UTC-6, Paul van Delst wrote:
>> On 05/01/12 10:27, David Fanning wrote:
>>> Paul van Delst writes:
>>>
>>>> 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?
>>>
>>> You must be living in a perfect world!
>>>
>>> I would say the connection between IDLgrXXXX methods and function graphics routines is "casual" at best. Maybe
>>> "haphazard" or "accidental" is a better description. Most things work right up until you are too committed to
>>> turn back. :-)
>>
>> Well, you know, this is probably about the sixth or seventh time where, after a period of weeks/months of doing
>> actual work, I come back to some IDL apps thinking "you know, it sure would be neat to use NG in this application".
>> And then, after a day of mucking about trying to figure out the cognitive pathways that led to the NG system, I
>> realise why I stopped doing this the last time.
>>
>> It is quite frustrating.
>>
>> paulv
>
> Hi Paul,
>
> The Erase method was officially added to the Window function in IDL 8.2, which will be available in just a few weeks.
> In the meantime, you could instead try using the "SetData" method to simply replace the plot data. That should
> actually be much faster than completely destroying the plot and recreating it.

Thanks for the info. I will alert of our IT folks to keeep an eye out for the release.

And, yes, I realise that the setdata method is better/faster but, as I pointed out in my reply to MikeG, this was a
drop-in replacement of an NG window into a DG widget app. I would have to add the NG graphics reference to the widget
state vector. As I also said, that's not a very big deal, but a working erase method would have been immediately successful.

I know, I know, I'm a crotchety bugger... but I miss those "Will this work? Yes it does!" moments. Especially after I
had one when I replaced the WIDGET_DRAW function with WIDGET_WINDOW simply by changing the name and, voila, there was my
newly created NG window in my widget app waiting for me to fill it data plots.

cheers.

paulv
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Ice and Wind: Standing on the Arctic Ocean
Next Topic: colorbar question

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

Current Time: Fri Oct 10 00:37:07 PDT 2025

Total time taken to generate the page: 0.48100 seconds