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

Home » Public Forums » archive » Re: How to restrict region for !p.multi?
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
Re: How to restrict region for !p.multi? [message #971] Wed, 21 April 1993 07:10
Jackel is currently offline  Jackel
Messages: 30
Registered: April 1993
Member
In article <20APR199309583254@stars.gsfc.nasa.gov>
fireman@stars.gsfc.nasa.gov (Gwyn F. Fireman) writes:

> From: fireman@stars.gsfc.nasa.gov (Gwyn F. Fireman)
> Subject: How to restrict region for !p.multi?
> Date: Tue, 20 Apr 1993 13:58:00 GMT
> Hello, IDL users -
>
> I'm using !p.multi to make a grid of 1-d plots under VMS IDL 2.4.0. In
> order to have the plots stack perfectly, I set !x.margin and !y.margin to 0.
> Unfortunately, this leaves no margin around the grid for annotation.
>
> I tried setting !p.region, but this seems to override the !p.multi
> settings. How do I restrict the output of !p.multi to a certain region?
> __.
> / | , , , , , ,_ Gwyn F. Fireman
> (__/|/(_(_)(_/|/| |_/ Computer Sciences Corporation
> /| /| IUEGTC::FIREMAN IUE Observatory
> (_/ (_/ fireman@iuegtc.dnet.nasa.gov (301) 794-1560
------------------------------------------------------------ ---------------

Although I don't know of any elegant way of solving this problem, there
is an interesting way to do it by using negative values for the margins.
Here's an example using 3 sets of data plotted in a vertical stack:

x= randomn(seed,50,3) ;dummy data
null= replicate(' ',30) ;empty labels

ymargin0= [0,2] ;vertical margins for each
ymargin1= [2,0] ;plot. Note that ymargins
ymargin2= [4,-2] ;are [lower,upper]

!p.multi= [0,1,3]

plot,x(*,0),YMARGIN=ymargin0,XTICKNAME=null
plot,x(*,1),YMARGIN=ymargin1,XTICKNAME=null
plot,x(*,2),YMARGIN=ymargin2


The basic ideas are that:

-the total value of the upper and lower margins must be the same for each plot

-the total of the current upper margin and the previous lower margin must be
zero, in order to keep the plots adjacent. However, you will probably need
a non-zero upper margin to start with, and a non-zero lower margin to end with.


Also, it is usually necessary to mess with YTICKV and YTICKNAME, so that
the highest y-label on the current plot isn't in the same place as the
lowest y-label on the previous plot ie. if all the y-axes go from -4 to 4,
you would only want to label -3 to 3.

Anybody else have a better idea?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL-Widgets at DecWindows environment
Next Topic: Call for presentations: Navy SciViz/VR seminar

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

Current Time: Wed Oct 08 19:12:59 PDT 2025

Total time taken to generate the page: 0.00774 seconds