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

Home » Public Forums » archive » Re: Multilayered plots
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: Multilayered plots [message #45050 is a reply to message #45048] Tue, 02 August 2005 11:28 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Hrafnkell writes:

> Every six hours i have to plot around 600 pictures from meteorological
> data (actually skewt diagrams) for weather forecast on the internet so
> efficient plotting routines are very desirable. Currently each picture
> is made in two phases, first a background is plotted (axes and some
> lines in the cartesian plane) with one routine and then that background
> is overplotted with another routine. The thing is that the background
> is the same for all of the pictures and it takes some time to plot so
> it's kinda stupid to plot it 600 times.
>
> You can see the pictures here
> http://www.os.is/~or/vedurspa/serkort.html by clicking one of the
> diamonds. The latter routine overplots the two fat irregular lines
> (blue and red).
>
> How can I weasel out of plotting the background every time? A routine
> which cleanes specific parts of the display seems utopic...I tried to
> save the background as .png picture and then plotting the image with
> Craig Markwardt's plotimage routine. That was quite a lot faster but i
> was still plotting the background every time and besides, the
> background didn't look good at all (i presume that partly explains the
> speed-up)

I'd use smoke and mirrors. That is to say, a pixmap and "DEVICE, COPY"

Plot your background on a pixmap window that is the same size as your
"display window":

WSet, displayWindow
Window, /Free, /Pixmap, XSize=!D.X_Size, YSize=!D.Y_Size
pixmapID = !D.Window
Plot, backgroundStuff, ....

Then, when you are plotting your display windows, copy the background
from the pixmap:

WSet, newDisplayWindow
DEVICE, Copy=[0, 0, !D.X_Size, !D.Y_Size, 0, 0, pixmapID}
Plot, newStuff...

This is about 1000 times faster than TVing the image, and
probably 10,000 times faster than what you are doing now. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: How to plot multiple charts and ho to round float to specific precision?
Next Topic: FastDL add-on for IDL now available

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

Current Time: Fri Oct 10 10:03:19 PDT 2025

Total time taken to generate the page: 1.11807 seconds