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

Home » Public Forums » archive » IDL 8 NG widget problem
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 NG widget problem [message #74790 is a reply to message #74728] Wed, 02 February 2011 00:21 Go to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
On 2 fév, 01:18, Chris Torrence <gorth...@gmail.com> wrote:
> On Feb 1, 9:22 am, caroline cox <caroline.co...@gmail.com> wrote:
>
>
>
>> thanks, but I am not sure that will help.  I have shown a simplified
>> version of my program here.  I actually call other functions from the
>> menu buttons and I guess I want the function to make sure that if
>> there is something already plotted in the widget space then it clears
>> it and starts a fresh plot.  I use widget_control, draw, get_value=win
>> then win.select to plot in the current window.  Is there anything that
>> I can use here to clear the current plot?  I have tried win.refresh.
>
> Hi,
>
> In IDL 8.1 we are adding a "Delete" method to the new graphics - it
> will delete just that graphic. We are also adding a GetData/SetData
> method, so you can change the data on an existing graphic (like a
> Plot) and all of the properties will stay the same.
>
> For now, in IDL 8.0, you can use the undocumented "PutData" method:
>   p = plot(/test)
>   p.PutData, findgen(2,100)
> The first column is the X values, and the second is the Y values.
>
> Hope this helps!
>
> -Chris
> ITTVIS

The question is how a NG Window can be cleared.
Before last message from Chris Torrence, I was thinking to draw, just
before your plot in each menu branch, a white image, i.e.:
p=image(bytarr(graphicWin.DIMENSIONS)+255B,/DEVICE,/CURRENT)
Not very elegant, but it seems to work.
No help, of course, from the present ITTVIS documentation, which is
our main problem !
alx.
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Contour Plot w/ Colorbar
Next Topic: idl -vm and args / full idl and args

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

Current Time: Wed Oct 08 19:58:33 PDT 2025

Total time taken to generate the page: 0.00232 seconds