[Thread Prev][Thread Next][Index]

Re: stretched axes



Hello Jeff,
	There is an "original" PlotPlus command that allows you to
add an extra xaxis or yaxis to an existing plot that may be an
alternate solution for you.  Here is a demo - cut and paste it into
a ferret session to see how it works.  For details of the %xaxis
and %yaxis commands see "CHAPTER 10 ADVANCED COMMANDS" in

http://ferret.wrc.noaa.gov/Ferret/Documentation/
                PPLUS_Users_Guide/pplus_users_guide.html

where there is also a %range command if you wanted to automate the
rescaling.
Good Luck,
Mick

!----------------------------------------------------------
! first create two variables with markedly different ranges
def axis/t=15-jan-1999:24-mar-1999:1/units=days tax
def grid/t=tax grd ; let time=t[g=grd]
let a=l[g=grd] ; let p=a^2

! look at the ranges ...
list a[l=@min],a[l=@max],p[l=@min],p[l=@max]
! ... in this case 0-70 would work for "a" and 0-5000 for "p"

! if time along the x axis were acceptable then
plot/nolab/set a,(70/5000)*p
! blank out the right hand y-axis
ppl axset,1,1,1,0 ; ppl yaxis,0,70,5 ; ppl yfor,(i2) ; ppl plot
label/nouser,-0.5,3,0,90,0.15,Black Curve

! this draws both curves leaving room for the p axis
! which is drawn with the %yaxis command

ppl %yaxis/nouser,0,5000,500,8,0,2,1,1,0.08,(i4)
label/nouser,8.6,3,0,270,0.15,@p2Red Curve
!------------------------------------------------------

To duplicate your situation using plot/vs to make time along y-axis
cur and paste the following to make a new plot

!------------------------------------------------------
plot/vs/nolab/line=1/set a,time
ppl axset,0,1,1,1 ; ppl xaxis,0,70,5 ; ppl xfor,(i2) ; ppl plot
plot/vs/nolab/line=2/over (70/5000)*p,time
label/nouser,4,-0.6,0,0,0.15,Black Curve
! then add the extra x-axis for "p"
ppl %xaxis/nouser,0,5000,500,6,0,2,1,1,0.08,(i4)
label/nouser,4,6.5,0,0,0.15,@p2Red Curve
!------------------------------------------------------

|--****--****-*---*---***--***--|____spillane@pmel.noaa.gov____|
|-*__---*-----*--*-*--*--*-*--*-|_SCIENCE APPLICATIONS SUPPORT_|
|--***--*-----*-*---*-***--***--|____EPIC/Ferret/PlotPlus______|
|-----*-*-----*-*****-*----*----|__Room 2070 Bldg#3 NOAA/PMEL__|
|-****---****-*-*---*-*----*----|____Phone_:_(206)526-6780_____|




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement