[Thread Prev][Thread Next][Index]

Re: [ferret_users] multiple property-property plots in a single figure



Hi,

If you want to ensure a little bit of space around the plot  rather than calclulating the various extrema you can let
ferret do the work for you by making two redundant plots and gettiing information from them

!plot all A values and get horizontal limits 
PLOT A[d=1], A[d=2],A[d=3]

let xlo=($YAXIS_MIN)
let xhi=($YAXIS_MAX)

! Similar for B and vertical limits
PLOT B[d=1], B[d=2],B[d=3]

let ylo=($YAXIS_MIN)
let yhi=($YAXIS_MAX)

!plot AvB

plot/vs/d=1/hlim=`xlo`:`xhi`/vlim=`ylo`:`yhi` A,B
plot/vs/d=2/over A, B
plot/vs/d=3/over A, B

Russ

On Friday 02 September 2011 08:40, William S. Kessler wrote:
> Hi Keith - It's brute-force, but try the following. BK
> 
> plot/vs/ 
> hli=`min(a[d=3],min(a[d=1],a[d=2]))`:`max(a[d=3],max(a[d=1],a[d=2]))`/ 
> vli=`min(b[d=3],min(b[d=1],b[d=2]))`:`max(b[d=3],max(b[d=1],b[d=2]))`/ 
> d=1 a,b
> plot/vs/d=2/over A, B
> plot/vs/d=3/over A, B
> 
> 
> 
> On Sep 1, 2011, at 2:36 PM, Keith Lindsay wrote:
> 
> > Hi,
> >
> > I'd like to plot multiple property-property plots in a single figure  
> > and would like to avoid having to manually set axis ranges. I can't  
> > figure out how to do this.
> >
> > For example, suppose A & B are expressions that I'd like to plot  
> > against each other and I'd like to combine the plots from multiple  
> > datasets into a single figure.
> >
> > plot/vs/d=1 A, B
> > plot/vs/d=2/over A, B
> > plot/vs/d=3/over A, B
> >
> > A typical situation is that the different datasets are output from  
> > different model simulations.
> >
> > However, if the range of A and/or B in d=2 or d=3 exceeds the range  
> > in d=1, then I miss out on some points.
> >
> > One solution is to hard code axis ranges with known 'reasonable'  
> > values. I'd like to avoid this because I then need to generate the  
> > ranges and resulting script is not easily transferable when looking  
> > at other expressions.
> >
> > Another solution is to compute, with ferret, min's and max's of A  
> > and B over each dataset and take the corresponding min and max over  
> > the datasets. This leads to rather bulky code.
> >
> > I'm wondering if another ferret user has found a simple way to do  
> > this that I haven't been able to come up with.
> >
> > Thanks, Keith
> >
> > ******************************************************************
> > Keith Lindsay                http://www.cgd.ucar.edu/oce/klindsay/
> > email: klindsay@xxxxxxxx   phone: 303-497-1722   fax: 303-497-1700
> 
> 


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement