[Thread Prev][Thread Next][Index]

Re: Re: Re: Ferret: fill colors between two lines



Hi, Jaison Kurian,
 
I made a mistake last time. I changed t1=1775, which is beyond hte time series. This time both scripts works.  You do me a big favor. Thanks a lot!

Hi Gao Rongzhen,
                  I donn't have any problem with the script with Ferret 
version 5.53 on my linux PC. I don't know what is the reason for that
error message in this case. Anyway please have a trial with the attached
jnl file (fil_betw.jnl), it is assumed that test.asc is the same dataset
that you send earlier.
 
   Then regarding  " t[gt=t2]*0 + y[gy=yax]"
 
     here we are definning a new variable, which will be defined on T and
     Y axes, which will have the value of correspoding Y-coordianate for
     all T-points (makes easier to define /LEVELS for the FILL command).
 
Please have a trial with the attached jnl file, and let me know the
status.
 
With Regards
 
Jaison
 
 
On Wed, 15 Jun 2005, Gao Rongzhen wrote:
 
>  Hi Jaison Kurian,
>
>  I  run Ferret 5.53 under windows98.
>  I tried the script you provided. But i just got a time series, and was informed "no valid data" on the plot (pls see the attached GIF) .
>  For I'm not familiar the usage of  " t[gt=t2]*0 + y[gy=yax]", and don't know what's happened on the script. I have to turn to you for further help.
>
>
>
>  Hi Gao Rongzhen,
>                    I think there are several ways to do this ( not
>  sure about fill_between.jnl, it needs atleast one curve). If you
>  don't mind to define one more viewport and few more variables..it
>  is done !!!! Have a trial with the script below. Plese find the details
>  inside the script.
>
>  Hope This Helps
>
>  With Regards
>
>  Jaison
>
>  !---------script starts here--------------------------
>  \ cancel mode verify
>
>    define axis/t=1789:1992/npoints=204 t2
>    define grid/t=t2 g2
>    file/var=aa/grid=g2 test.asc
>    set window/size=1/aspect=1.294
>    def view/xlim=0.1,0.92/ylim=0.3,0.7 v11
>    def view/xlim=0.1,0.92/ylim=0.3,0.7 v12 ! same as above, but different name
>
>  ! set some values, the accuracy of the plot will depend on these
>
>    let ylo     = -15     ! lo for Y-axis
>    let yhi     =  15     ! hi for Y-axis
>    let tlo_cut = 1880    ! t-value for first line
>    let thi_cut = 1920    ! t-value for second line
>
>  ! to get the color fill between the lines
>
>    set view v11                        ! the first viewport
>    define axis/y=`ylo`:`yhi`:1 yax
>    let dummy =  t[gt=t2]*0 + y[gy=yax]
>    let dummy1 = IF t[gt=dummy] GE `tlo_cut` AND t[gt=dummy] LE `thi_cut` THEN dummy
>    fill/ov/nokey/nolab/lev=(`ylo`,`yhi`,`yhi-ylo`)/noaxes/pal=grey dummy1
>
>  ! to get the lines
>
>    plot/ov/nolab/vs/noaxes/line/color=3 y[gy=yax]*0+`tlo_cut`, y[gy=yax]
>    plot/ov/nolab/vs/noaxes/line/color=4 y[gy=yax]*0+`thi_cut`, y[gy=yax]
>
>  ! to get the actual plot
>
>    set view v12                                 ! the second viewport
>    plot/nolabel/line=8/vlim=`ylo`:`yhi`/set aa
>    ppl axlabp -1,-1
>    ppl tics .08,.12,.08,.12
>    ppl yfor "(i3)"
>    ppl yaxis -15,15,2.5
>    ppl axlsze,0.2,0.2
>    ppl txlsze,0.2
>    ppl plot
>
>  !-----end of script-----------------------------------
>
>  On Tue, 14 Jun 2005, Gao Rongzhen wrote:
>
> >
> >
> >   Hi, All
> >
> >   I have an annual mean time series ranging from 1789 to 1992. Now i want to add two vertical lines at t=1775 and t=1785, and fill coclors (gray) between them. I try to use fill_between.jnl, but failed. Can anyone give me some hints to get it? Thanks a lot.
> >   ------------------------------------
> >
> >   define axis/t=1789:1992/npoints=204 t2
> >    define grid/t=t2 g2
> >    file/var=aa/grid=g2 d:\test.asc
> >    set window/size=1/aspect=1.294
> >    def view/xlim=0.2,0.82/ylim=0.4,0.7 v11
> >
> >    set view v11
> >    plot/nolabel/line=8/set aa[l=1:204]
> >    ppl axlabp -1,-1
> >    ppl tics .08,.12,.08,.12
> >    ppl yfor "(i3)"
> >    ppl yaxis -15,15,2.5
> >    ppl axlsze,0.2,0.2
> >    ppl txlsze,0.2
> >    ppl plot
> >    frame/file=test.gif
> >
> >   ------------------------------------
> >
> >   GRZ
> >
>
>
 
-- 
___________________________________________________
 
     Jaison Kurian
     Centre for Atmospheric and Oceanic Sciences
     Indian Institute of Science
     B A N G A L O R E   560 012
     Ph: +91-80-22932505 Extn. 229
         +91-80-23600450
     Fax:+91-80-23600865
___________________________________________________


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement