[Thread Prev][Thread Next][Index]

Re: Simple question but troubles me long time!

	There are a number of "go" files that are supplied with ferret
that deal with separate "left" and "right" axes and multiple
horizontal or vertical axes.  These are
	left_axis_plot.jnl   right_axis_plot.jnl
	multi_xaxis_plot1.jnl  multi_xaxis_overlay.jnl
	multi_yaxis_plot1.jnl  multi_yaxis_overlay.jnl
in /opt/local/ferret/ferret/go for me.

If you only want to plot two variables (temp and salt) versus depth
the following, adapted from the above go files may suit your
purpose, if edited to fit your data.  I've used dummy values for
the data so if you cut the following lines they should run and show
you how it works

! plots temp and salinity data vs depth 
ppl axlen,8,6                         ! set axis lengths

region/i=1:10                         ! define dummy data
let depth=i ; let temp=1/i ; let salt=30+i/10 
plot/vs/set/nolab/line=1 temp,depth   ! plot temp vs depth
ppl axset 0,1,1,1                     ! use lower axis for temp
ppl pen,1,1                           ! black pen for temp
ppl xaxis,0,1,0.1 ; ppl xfor,(f3.1) 
ppl xlab,@p1Temperature               ! and axis label
ppl ylab,@p1Depth 
ppl yaxis,11,0,-1                     ! invert depth axis
ppl plot 
plot/vs/set/nolab/line=1 salt,depth   ! now plot salt vs depth
ppl pen,1,2                           ! using a red pen for line
ppl %xaxis/nouser 30,31,0.1,6,,,,+1,0.1,(f4.1) 
ppl window,off 
ppl plot/over 
ppl %label/nouser,4,6.5,0,0,0.12,@p2Salinity ! add red axis label

|-*__---*-----*--*-*--*--*-*--*-|_SCIENCE APPLICATIONS SUPPORT_|
|-----*-*-----*-*****-*----*----|__Room 2070 Bldg#3 NOAA/PMEL__|

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement
Privacy Policy | Disclaimer | Accessibility Statement