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

Home » Public Forums » archive » Re: How to erase a (function graphics) plot.
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: How to erase a (function graphics) plot. [message #88542 is a reply to message #79452] Sun, 11 May 2014 12:01 Go to previous messageGo to previous message
Bob[4] is currently offline  Bob[4]
Messages: 24
Registered: April 2009
Junior Member
On Monday, March 5, 2012 10:02:57 AM UTC-7, Mark Piper wrote:
> On 3/5/2012 5:53 AM, alx wrote:
>
>> On 5 mar, 06:27, wlandsman<wlands...@gmail.com> wrote:
>
>>> I am building a widget application with a widget_window for displaying function graphics plots. By default, function graphics does not erase the old plot in the same window.
>
>>>
>
>>> p1 = plot(indgen(10))
>
>>> p2 = plot( sin(indgen(10),/current)
>
>>>
>
>>> There is a delete method
>
>>>
>
>>> p1.delete
>
>>>
>
>>> but that doesn't delete the axes, which still get jumbled together. There is a close method but that destroys the window, and I'd like to keep reusing the widget_window.
>
>>>
>
>>> Right now I am erasing the plot by loading a white IMAGE() but I hope there is a better way.
>
>>>
>
>>> Thanks, --Wayne
>
>>>
>
>>>
>
>>
>
>> p1.delete looks like to be equivalent to p1.setdata(0), i.e. erasing
>
>> only the data. If you want to erase the entire plot, you can erases
>
>> the axes by doing:
>
>> IDL> p1['AXIS0'].delete ;erase X axis
>
>> IDL> p1['AXIS1'].delete ;erase Y axis
>
>> alx.
>
>
>
> In 8.2, there will be an ::Erase method for NG, analogous to ERASE for
>
> DG. (In 8.0 & 8.1, I've "erased" plots as Alain has.)
>
>
>
> mp

Did this happen? I don't see it in 8.3.

An erase method would be very useful. I find that when I rerun a script that greats a (function graphics) plot it always creates a new window, which steals the focus (and pops up the new window in the wrong place). This drives me crazy. It would be much better if I could erase the old one and reuse the same window. Then my window layout would stay put and focus would stay in the editing window.

Am I missing something?

Bob
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problem with IDLnetURL Callback Function
Next Topic: how to shade region of 2-D plot

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

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

Total time taken to generate the page: 0.00513 seconds