[Thread Prev][Thread Next][Index]

Re: overlaying years without regrid ?



> Is there any way to overlay in a single plot different years without
> using regrid?
> I have one time series of 4 years and neet to overlay them.

Hi Domingos,
	While I don't understand why you wish to exclude regridding from
the options, here is one way to do it - plot each year in overlapping
viewports.
Good luck,
Mick
!--------------------------------------------------------------------
! define demo function ...
def axis/t=1-jan-1981:31-dec-1984:1/units=days tax
def grid/t=tax grd
let v=sin(6.14*t[g=grd]/350)
! ... and see what it looks like
plot v

! make 4 identical viewports, using your favorite method; for example
ppl size 10 8 ; ppl axlen 8 6 ; ppl origin 1 1
def view/size=1/orig=0,0/clip=1,1 view1
def view/size=1/orig=0,0/clip=1,1 view2
def view/size=1/orig=0,0/clip=1,1 view3
def view/size=1/orig=0,0/clip=1,1 view4

! plot year#1
set view view1
plot/nolab/set/t=1-jan-1981:31-dec-1981/line=1 v
ppl txlint,,0    ! suppress YEAR in the axis label
ppl yaxis,-1.1,1.2,0.1  ! set y-axis to fit all years (if necessary)
ppl plot
label/nouser 0.2 5.0 -1 0 0.2 @p1@sr1981  ! add label to identify year#1
!plot year#2
set view view2
plot/nolab/set/t=1-jan-1982:31-dec-1982/line=2 v
ppl axset,0,0,0,0   ! suppress top, bottom, left, right axis drawing
ppl yaxis,-1.1,1.2,0.1  ! force the common y-axis to apply
ppl plot
label/nouser 0.2 4.5 -1 0 0.2 @p2@sr1982  ! add label to identify year#2
! plot year#3
set view view3
plot/nolab/set/t=1-jan-1983:31-dec-1983/line=3 v
ppl axset,0,0,0,0   ! suppress top, bottom, left, right axis drawing
ppl yaxis,-1.1,1.2,0.1  ! force the common y-axis to apply
ppl plot
label/nouser 0.2 4.0 -1 0 0.2 @p3@sr1983  ! add label to identify year#3
! plot year#4
set view view4
plot/nolab/set/t=1-jan-1984:31-dec-1984/line=4 v
ppl axset,0,0,0,0   ! suppress top, bottom, left, right axis drawing
ppl yaxis,-1.1,1.2,0.1  ! force the common y-axis to apply
ppl plot
label/nouser 0.2 3.5 -1 0 0.2 @p4@sr1984  ! add label to identify year#4




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement