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

Home » Public Forums » archive » Perspective view of a 2-d plot
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Perspective view of a 2-d plot [message #36369] Tue, 16 September 2003 14:57 Go to next message
Clay Blankenship is currently offline  Clay Blankenship
Messages: 4
Registered: September 2003
Junior Member
I'm sure there must be a way to do this in IDL but I don't know what it is.
I want to do 4 stacked 2-d plots using MAP_SET and PLOTS, looking something
like this:
___________
/ /
/__________/
___________
/ /
/__________/
___________
/ /
/__________/
___________
/ /
/__________/

I want to make specific humidity plots at 4 different levels in the
atmosphere. I already do these individually but want to try visualizing
them this way.

Thanks,
Clay

--
Clay Blankenship Change 'Z' to 's' to reply
Naval Research Laboratory
Monterey, CA
Re: Perspective view of a 2-d plot [message #36458 is a reply to message #36369] Wed, 17 September 2003 09:19 Go to previous message
Clay Blankenship is currently offline  Clay Blankenship
Messages: 4
Registered: September 2003
Junior Member
David Fanning wrote:

> Clay Blankenship writes:
>
>> I'm sure there must be a way to do this in IDL but I don't know what it
>> is. I want to do 4 stacked 2-d plots using MAP_SET and PLOTS, looking
>> something like this:
>> ___________
>> / /
>> /__________/
>> ___________
>> / /
>> /__________/
>> ___________
>> / /
>> /__________/
>> ___________
>> / /
>> /__________/
>>
>> I want to make specific humidity plots at 4 different levels in the
>> atmosphere. I already do these individually but want to try visualizing
>> them this way.
>
> I can't really tell what you are looking for
> here. If you just want four plots in the window,
> setting !P.MULTI is the way to go:
>

Thanks for the reply. I should have been more explicit in saying I am
trying to do a perspective view of 4 parallel planes from somewhere
above and off to the side. I figured out a way to do it using the t3d
command and keyword.

for lev=1,4 do begin
z=.25*(lev-1)
xoff=.15-.05*lev
t3d,/reset,rot=[-65,20,0],translate=[xoff,0,z]
map_set,latcen,loncen,/cyl,/grid,/cont,$
limit=[lat1,lon1,lat2,lon2], $
/label,latlab=lon2-2,lonlab=lat2-2,$
position=p,/noerase,/t3d
endfor

I had to fiddle with the z offset to get them to line up vertically since I
couldn't figure out the right rotation to use.

I also got a reply from Jim Pendleton of RSI explaining how to do it using
Direct Graphics and Object Graphics.

Clay

--
Clay Blankenship Change 'Z' to 's' to reply
Naval Research Laboratory
Monterey, CA
Re: Perspective view of a 2-d plot [message #36464 is a reply to message #36369] Wed, 17 September 2003 06:44 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Clay Blankenship writes:

> I'm sure there must be a way to do this in IDL but I don't know what it is.
> I want to do 4 stacked 2-d plots using MAP_SET and PLOTS, looking something
> like this:
> ___________
> / /
> /__________/
> ___________
> / /
> /__________/
> ___________
> / /
> /__________/
> ___________
> / /
> /__________/
>
> I want to make specific humidity plots at 4 different levels in the
> atmosphere. I already do these individually but want to try visualizing
> them this way.

I can't really tell what you are looking for
here. If you just want four plots in the window,
setting !P.MULTI is the way to go:

!P.MULTI=[0,1,4]
Map_Set, ...
Oplot,...
Map_Set, /Advance ...
Oplot,...
Map_Set, /Advance ...
Oplot,...
Map_Set, /Advance ...
Oplot,...
!P.MULTI=0

If you want "stacked" plots, so that the upper border of
the lower plot is the lower border of the upper plot,
then you are going to have to become proficient in the
use of keywords. Here are a few you are going to have
to know how to use for sure: POSITION, NOERASE, and [XY]STYLE.
You are probably also going to have to know a trick for turning
off axis annotation occasionally. I use XTICKFORMAT='(A1)'.

Here is an example of a "stacked" plot, although it doesn't
use MAP_SET, which might introduce its own complications. :-)

http://www.dfanning.com/graphics_tips/ladder_plot.html

Cheers,

David
--
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Dataminer: faster way to get all records in a IDLdbRecordset table?
Next Topic: power law interpolation

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

Current Time: Wed Oct 08 20:02:36 PDT 2025

Total time taken to generate the page: 0.00891 seconds