[Thread Prev][Thread Next][Index]
Re: Re: label the value of a nunmber variable
hi Gao,
please use back-quotes `corr` instead of the forward single
quotes 'corr' that you've used in your script.
----------------------------
ARINDAM CHAKRABORTY
Department of Meteorology
Florida State University
Tallahassee, FL-32306, USA
Tel: +001-850-6443524 (Off)
+001-850-5758550 (Res)
Fax: +001-850-6449642
____________________________
On Mon, 3 Jan 2005, [gb2312] ¸ßÈÙÕä wrote:
> I tried as Arindam told me, but i'm informed as below:
>
> %LABEL/nouser 6.1,1.84,-1,0,0.16 ~'corr'
> Symbol not found
>
> My *.jnl file is :
>
> set view v11
> let cave=coral[d=1,l=1:191@ave]
> let cdif=coral[d=1,l=1:191]-cave
> let cdif2=cdif*cdif
> let csum=cdif2[l=1:191@sum]
> let sc=(csum/190)^0.5
> let stdc=cdif/sc
> let save=sst[d=2,l=1:191@ave]
> let sdif=sst[d=2,l=1:191]-save
> let sdif2=sdif*sdif
> let ssum=sdif2[l=1:191@sum]
> let ss=(ssum/190)^0.5
> let stds=sdif/ss
> let a=stdc*stds
> let aa=a[l=1:191@sum]
> let corr=aa/190.
> list corr
> go margins ($margin1)
> GO sst_left sst[d=2,l=1:191] "SSTa(^oC)"
> GO coral_right coral[d=1,l=1:191] "-100,100,25" "gray value" 0.12 ",,,+1,,(I4)"
> label/nouser ($rr_pos) ~'corr'
> let zero=0
> let xlev=if(l eq 1)then `($XAXIS_MIN)` else `($XAXIS_MAX)`
> let ylev=zero+l-l
> plot/o/nolab/line=4/vs/l=1:2 xlev,ylev
> ------------------------------------------------------------
> Ferret version i'm using is 5.53. Can anyone tell me why and how to label value of "corr"?
>
>
>
>
> hi Gao,
> the value of a scaler variable is obtained by enclosing it in
> the back-quotes as `variable_name`. Now if you precede this by a ~
> character, it'll become a string and you can use it in a label
> command. Moreover, you can use the font specification symbols @XY
> where XY is the font type to label the value of that variable.
> Here's one example:
>
> ! make a sine plot
> plot/x=0:360 sin(x*3.1415/180)
>
> ! we'll label this variable
> let corr = 12/190
>
> ! label it, using the default font and precision
> label 250,0.80,0,0,0.13 ~`corr`
>
> ! now if you want a different font
> label 250,0.70,0,0,0.13 @TR`corr`
>
> ! and the precision as per your need
> label 250,0.60,0,0,0.13 @TR`corr,p=-3` !p=-3 means the user wants 3
> digits after the decimal point.
>
> For more details about font control, look at
> http://ferret.wrc.noaa.gov/Ferret/Documentation/Users_Guide/current/Chapter6_Customizing_Plots.htm#_VPINDEXENTRY_762
>
> or precision control, look at
>
> http://ferret.wrc.noaa.gov/Ferret/Documentation/Users_Guide/current/Chapter3_Variables_and_Expressions.htm#_VPINDEXENTRY_517
>
> or label command, look at
>
> http://ferret.wrc.noaa.gov/Ferret/Documentation/Users_Guide/current/Chapter6_Customizing_Plots.htm#_VPINDEXENTRY_721
>
>
> ----------------------------
> ARINDAM CHAKRABORTY
> Department of Meteorology
> Florida State University
> Tallahassee, FL-32306, USA
> Tel: +001-850-6443524 (Off)
> +001-850-5758550 (Res)
> Fax: +001-850-6449642
> ____________________________
>
> On Sat, 1 Jan 2005, [gb2312] ¸ßÈÙÕä wrote:
>
> > Hi, All
> >
> > My problem this time is how to label the value of a nunmber variable on the plot?
> >
> > For example:
> > let corr=12/190.
> >
> > Now, i want to label the value of corr, and how can i achieve it? Thanks!
> >
> > Gao Rongzhen
> >
>
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement