Re: howto select and deselect plotting windows? [message #75225] |
Mon, 21 February 2011 12:05  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Jeremy Bailin writes:
> Incidentally, a *huge* advantage to doing it within cgWindows is that the data coordinate system of each window is preserved when you switch back and forth. So if you overplot things on window 0, they end up placed correctly on window 0's coordinate system.
Not to mention that you could use different colors
and color tables in different windows and they would
be preserved as well.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: howto select and deselect plotting windows? [message #75226 is a reply to message #75225] |
Mon, 21 February 2011 12:01   |
Jeremy Bailin
Messages: 618 Registered: April 2008
|
Senior Member |
|
|
On Monday, February 21, 2011 1:13:09 PM UTC-5, David Fanning wrote:
> simona bellavista writes:
>
>> I am looking for a way to select and deselect plotting windows, going
>> back and forth between them.
>> I mean I would like to
>>
>> select <window 0>
>> plot, x1, y1
>>
>> and then
>>
>> select <window 1>
>> plot, t, s
>>
>> and then again
>>
>> select <window 0>
>> oplot, x2, y2
>>
>> How do I do this? I remember I read something like that a while ago,
>> but now I cannot find it anymore...
>
> You use WSet to select the current graphics window.
> Or, if you are using resizeable graphics windows
> from the Coyote Graphics System, you would use
> cgSet.
>
> http://www.idlcoyote.com/graphics_tips/coyote_graphics.html
Incidentally, a *huge* advantage to doing it within cgWindows is that the data coordinate system of each window is preserved when you switch back and forth. So if you overplot things on window 0, they end up placed correctly on window 0's coordinate system. Compare the locations of the plusses:
IDL> window,0
IDL> plot, [0,1],[0,1]
IDL> window,1
IDL> plot, [0,2],[0,2]
IDL> wset,0
IDL> oplot, psym=1, [0.1], [0.8]
with
IDL> cgwindow, 'plot', [0,1],[0,1]
IDL> wids = cgquery()
IDL> cgwindow, 'plot', [0,2],[0,2]
IDL> cgset, wids[0]
IDL> cgwindow, 'oplot', [0.1],[0.8], psym=1, /addcmd
-Jeremy.
|
|
|
Re: howto select and deselect plotting windows? [message #75227 is a reply to message #75226] |
Mon, 21 February 2011 10:13   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
simona bellavista writes:
> I am looking for a way to select and deselect plotting windows, going
> back and forth between them.
> I mean I would like to
>
> select <window 0>
> plot, x1, y1
>
> and then
>
> select <window 1>
> plot, t, s
>
> and then again
>
> select <window 0>
> oplot, x2, y2
>
> How do I do this? I remember I read something like that a while ago,
> but now I cannot find it anymore...
You use WSet to select the current graphics window.
Or, if you are using resizeable graphics windows
from the Coyote Graphics System, you would use
cgSet.
http://www.idlcoyote.com/graphics_tips/coyote_graphics.html
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: howto select and deselect plotting windows? [message #75228 is a reply to message #75227] |
Mon, 21 February 2011 10:12   |
simona bellavista
Messages: 56 Registered: December 2009
|
Member |
|
|
ok, I solved by using wset
http://idlastro.gsfc.nasa.gov/idl_html_help/WSET.html
On Feb 21, 7:03 pm, simona bellavista <afy...@gmail.com> wrote:
> Dear idl users,
>
> I am looking for a way to select and deselect plotting windows, going
> back and forth between them.
> I mean I would like to
>
> select <window 0>
> plot, x1, y1
>
> and then
>
> select <window 1>
> plot, t, s
>
> and then again
>
> select <window 0>
> oplot, x2, y2
>
> How do I do this? I remember I read something like that a while ago,
> but now I cannot find it anymore...
>
> Many thanks to anybody would like to reply me
|
|
|
Re: howto select and deselect plotting windows? [message #75300 is a reply to message #75226] |
Tue, 22 February 2011 13:06  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
Jeremy Bailin wrote:
> On Monday, February 21, 2011 1:13:09 PM UTC-5, David Fanning wrote:
>> simona bellavista writes:
>>
>>> I am looking for a way to select and deselect plotting windows, going back and forth between them. I mean I would
>>> like to
>>>
>>> select <window 0> plot, x1, y1
>>>
>>> and then
>>>
>>> select <window 1> plot, t, s
>>>
>>> and then again
>>>
>>> select <window 0> oplot, x2, y2
>>>
>>> How do I do this? I remember I read something like that a while ago, but now I cannot find it anymore...
>> You use WSet to select the current graphics window. Or, if you are using resizeable graphics windows from the
>> Coyote Graphics System, you would use cgSet.
>>
>> http://www.idlcoyote.com/graphics_tips/coyote_graphics.html
>
> Incidentally, a *huge* advantage to doing it within cgWindows is that the data coordinate system of each window is
> preserved when you switch back and forth. So if you overplot things on window 0, they end up placed correctly on
> window 0's coordinate system. Compare the locations of the plusses:
>
> IDL> window,0 IDL> plot, [0,1],[0,1] IDL> window,1 IDL> plot, [0,2],[0,2] IDL> wset,0 IDL> oplot, psym=1, [0.1],
> [0.8]
>
> with
>
> IDL> cgwindow, 'plot', [0,1],[0,1] IDL> wids = cgquery() IDL> cgwindow, 'plot', [0,2],[0,2] IDL> cgset, wids[0] IDL>
> cgwindow, 'oplot', [0.1],[0.8], psym=1, /addcmd
Just for completeness, same goes for function graphics in IDL v8+
IDL> pA=plot([0,1],[0,1])
IDL> pB=plot([0,2],[0,2])
IDL> pA=plot([0.1], [0.8],symbol='diamond',/overplot)
cheers,
paulv
|
|
|