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 #79452] Mon, 05 March 2012 09:02 Go to previous message
Mark Piper is currently offline  Mark Piper
Messages: 198
Registered: December 2009
Senior Member
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
[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 16:02:34 PDT 2025

Total time taken to generate the page: 0.00512 seconds