Re: Plotting to more than one window [message #34159] |
Mon, 24 February 2003 11:19 |
Pavel Romashkin
Messages: 166 Registered: April 1999
|
Senior Member |
|
|
I use DISPLAY to do this. It is object based but you don't have to think
of it this way - it is command-line driven. You can specify to keep the
coordinate system for each Display window, and you can have as many open
at the same time as your screen will fit. Plus, you get legends, colors,
mouse-click for plot deletion, moveable text labels, and ROI.
Disclaimer: 2D plotting only.
http://www.ainaco.com/idl/idl_library/display.html
Cheers,
Pavel
Matt Feinstein wrote:
>
> Hi all--
>
> I'm trying to plot data alternately, back and forth, to more than one
> window, and have discovered, to my horror, that OPLOT uses the
> coordinate conversion parameters for the -last- 'PLOT' procedure,
> regardless of what the current window you're plotting in happens to
> be. I can think of various messy and unpleasant ways to get the
> plotting coordinate parameters I want in the windows I want, when I
> want them-- but it would be nice if there was a neat and pleasant way
> to do it-- is there?
>
> Matt Feinstein does not include his email address
> in the text of usenet postings.
> --------
> Harvard Law of Automotive Repair: Anything that goes away
> by itself will come back by itself.
|
|
|
Re: Plotting to more than one window [message #34174 is a reply to message #34159] |
Sat, 22 February 2003 06:32  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
David Fanning wrote:
> Matt Feinstein (notspecified@dev.null) writes:
>
>> I'm trying to plot data alternately, back and forth, to more than one
>> window, and have discovered, to my horror, that OPLOT uses the
>> coordinate conversion parameters for the -last- 'PLOT' procedure,
>> regardless of what the current window you're plotting in happens to
>> be. I can think of various messy and unpleasant ways to get the
>> plotting coordinate parameters I want in the windows I want, when I
>> want them-- but it would be nice if there was a neat and pleasant way
>> to do it-- is there?
>
> Do you mean without using an object? Then, no, there
> is no neat and pleasant way to do it. :-)
>
> The messy way, of course, is just to save the appropriate
> system variables:
>
> Window, 1
> Plot, data
> p1 = !P
> x1 = !X
> y1 = !Y
> z1 = !Z
> m1 = !Map
>
There are two routines of our library which saves and restores these system
variables.
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/savesysvar.tar.gz
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/restsysvar.tar.gz
regards
Reimar
be a problem. :-)
>
--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
|
|
|
Re: Plotting to more than one window [message #34175 is a reply to message #34174] |
Fri, 21 February 2003 17:49  |
btupper
Messages: 55 Registered: January 2002
|
Member |
|
|
On Fri, 21 Feb 2003 18:41:28 GMT, notspecified@dev.null (Matt
Feinstein) wrote:
> On Fri, 21 Feb 2003 10:58:36 -0700, David Fanning <david@dfanning.com>
> wrote:
>
>>
>> Do you mean without using an object? Then, no, there
>> is no neat and pleasant way to do it. :-)
>>
snipped
>
> Neat-- I hadn't realized I could change 'system' variables like that.
> Opens the door to all sorts of mischief.
>
Hi,
Before computers had keyboards and monitors, Liam Gumley had prepared
a neato solution to this multiple 'frames' problem using an IDL dodad
called handles (I think these are widget IDs.) It is a really slick
setup that allows you to save a 'frame' (e.g. the plotting parameters,
etc.) for a window, and then come back to it with having to replot.
You could move back and forth among different frames. I don't think
these tools (sf.pro, af.pro, lf.pro, bf.pro) are at www.gumley.com.
Try a google search.
I have adapted this idea to an object based frame tool that can be
used from the command line or within an application. Like Liam's
setup, it is for direct graphics routines. Each frame is stored in a
container and can be retrieved by name or position index. Frames can
be accessed randomly. It saves the system variables (and other
things) as David describes. It is available at
www.tidewater.net/~pemaquid
Cheers,
Ben
|
|
|
Re: Plotting to more than one window [message #34177 is a reply to message #34175] |
Fri, 21 February 2003 10:41  |
notspecified
Messages: 14 Registered: February 2002
|
Junior Member |
|
|
On Fri, 21 Feb 2003 10:58:36 -0700, David Fanning <david@dfanning.com>
wrote:
>
> Do you mean without using an object? Then, no, there
> is no neat and pleasant way to do it. :-)
>
> The messy way, of course, is just to save the appropriate
> system variables:
>
> Window, 1
> Plot, data
> p1 = !P
> x1 = !X
> y1 = !Y
> z1 = !Z
> m1 = !Map
>
> Window, 2
> Plot, moredata
> p2 = !P
> x2 = !X
> y2 = !Y
> z2 = !Z
> m2 = !Map
>
> Then, when you want to overplot, restore everything:
>
> WSet, 1
> !P = p1
> !X = x1
> !Y = y1
> !Z = z1
> !Map = m1
> OPlot, somedataOn1
>
> Cheers,
Neat-- I hadn't realized I could change 'system' variables like that.
Opens the door to all sorts of mischief.
Matt Feinstein does not include his email address
in the text of usenet postings.
--------
Harvard Law of Automotive Repair: Anything that goes away
by itself will come back by itself.
|
|
|
Re: Plotting to more than one window [message #34178 is a reply to message #34177] |
Fri, 21 February 2003 09:58  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Matt Feinstein (notspecified@dev.null) writes:
> I'm trying to plot data alternately, back and forth, to more than one
> window, and have discovered, to my horror, that OPLOT uses the
> coordinate conversion parameters for the -last- 'PLOT' procedure,
> regardless of what the current window you're plotting in happens to
> be. I can think of various messy and unpleasant ways to get the
> plotting coordinate parameters I want in the windows I want, when I
> want them-- but it would be nice if there was a neat and pleasant way
> to do it-- is there?
Do you mean without using an object? Then, no, there
is no neat and pleasant way to do it. :-)
The messy way, of course, is just to save the appropriate
system variables:
Window, 1
Plot, data
p1 = !P
x1 = !X
y1 = !Y
z1 = !Z
m1 = !Map
Window, 2
Plot, moredata
p2 = !P
x2 = !X
y2 = !Y
z2 = !Z
m2 = !Map
Then, when you want to overplot, restore everything:
WSet, 1
!P = p1
!X = x1
!Y = y1
!Z = z1
!Map = m1
OPlot, somedataOn1
Cheers,
David
P.S. I can think of several interesting ways to do this with
an object. And it would be neat and pleasant, but you would
have to remember to destroy the object when you were done
with it. If your mama trained you right, this probably wouldn't
be a problem. :-)
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|