Re: Re: [ncl-talk] linear fit

From: <tianxj_at_nyahnyahspammersnyahnyah>
Date: Fri, 6 Oct 2006 22:16:09 +0800

Hi all

  I want to add some text in any plot in a panel. Can anyone show me a simple example? Thanks.

Xiangjun

>
>
> -----原始邮件-----
> 从: "DennisShea"
> 到: tianxj_at_mail.iap.ac.cn
> 抄送: ncl-talk_at_ucar.edu
> 日期: 2006/10/05(四) 09:15am
> 主题: Re: [ncl-talk] linear fit
>
> >
> > I want to plot a curve with its linear fit. Which function can be work?
> >
> > ****************************************
>
> The functions "regline" or "regCoef"
>
> http://www.ncl.ucar.edu/Document/Functions/Built-in/regline.shtml
> http://www.ncl.ucar.edu/Document/Functions/Built-in/regcoef.shtml
>
> Some usage examples:
>
> http://www.ncl.ucar.edu/Applications/regress.shtml
>
> ------------------------------------------------------------
>
> if the "x" axis is time[*] and "y" is a time series of T[*]
>
> r = regline(time,T)
>
> ; y = mx+b
> ; m is the slope: r returned from regline
> ; b is the y intercept: r_at_yave attribute of r returned from regline
>
> data = new ( (/2,dimsizes(T)/), typeof(T))
> data(0,:) = T
> data(1,:) = r*(T-r_at_xave) + r_at_yave
>
> res = True
> res@ ..... = .....
> plot = gsn_csm_xy (wks, time, data, res)
>
> Good luck
> D
>
>


****************************************
* Xiangjun Tian *
* Institute of Atmospheric Physics *
* Chinese Academy of Sciences *
* P.O.Box 9804, *
* Beijing 100029, China *
* E-mail: tianxj_at_mail.iap.ac.cn *
* Tel: 86-10-62063912 (Office) *
****************************************

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Oct 06 2006 - 08:16:09 MDT

This archive was generated by hypermail 2.2.0 : Fri Oct 06 2006 - 09:01:27 MDT