[Thread Prev][Thread Next][Index]

Re: [ferret_users] PLOT on same time axis



Hi Samrat,

Here is a way to do it using the @SHF (shift) operator.
plot/l=1:12 var1,var1[l=@shf:24]

I'll use a fake variable to demonstrate how @shf works:

def axis/t=15-jan-2001:15-dec-2005/npoints=60 tax ; def grid/t=tax grd
let v=sin(t[gt=grd]/55)
list/l=1:36 v,v[l=@shf:24],v[l=@shf:-24]

If you look at the list this produces you'll see that @shf:24 looks forward by 24 time steps and @shf:-24 looks backward by 24 steps so the command

plot/l=1:12 v,v[l=@shf:24]

will plot steps 1:12 and 1+24:12+24 together. You might not like the year to appear on the time axis - to get rid of it use
plot/l=1:12/set v,v[l=@shf:24] ; ppl txlint,1,0 ; ppl plot

and if you wanted the year to be identified through the sample lines you could follow the recent example of defining a title

let/title="2001 Series" v2001=v[l=1:12] ; let/title="2003 Series" v2003=v[l=1:12@shf:24]
plot/set v2001,v2003 ; ppl txlint,1,0 ; ppl plot


Good luck,
   Mick
---------------

Samrat Rao wrote:
Hi,
I am using descriptor files that have data for 60 months. I am unable to overlay plots of different years on the same axis. Something like this:

plot var1[x=@ave,y=@ave,l=1:12,d=des_file1]
plot/overlay var1[x=@ave,y=@ave,l=25:36,d=des_file1]

Just the first plot appears on the window. I am unable to figure out the transforms/regridding necessary to accomplish this. I keep getting errors like:

**ERROR: illegal limits: var1 on grid (G012) is not in the range L=25:36
          Axis extremes are L=1:12

Please advise.
--

Samrat Rao




[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement