Re: how do I erase old data when using plots? [message #43419 is a reply to message #43412] |
Mon, 11 April 2005 10:06  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Jackson writes:
> Unlike the plot command, when I use the plots command and then re-use it
> with new data, the old data remains on the graph. While I am rather fond of
> the old data, I would like prefer it not be there. There doesn't appear to
> be an option for plots that will erase the old data first. Is there a
> simple way of clearing this data?
In simple situations, you just call the PLOT command again,
with the NODATA keyword set. Then draw your data with PLOTS.
Sometimes this flashes more than you would like, so then you
resort to smoke and mirrors and use the DEVICE, COPY technique
with a pixmap.
Make a pixmap the same size as your window. Draw the PLOT without
data into it. Use DEVICE with the COPY keyword to erase the display
window with the contents of the pixmap window. Then do your
PLOTS onto the display window. Very fast, very little flashing.
This is the way the pros do it. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|