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 #79455 is a reply to message #79452] Mon, 05 March 2012 04:53 Go to previous messageGo to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
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.
[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 20:04:08 PDT 2025

Total time taken to generate the page: 0.02783 seconds