Re: Re: Re: [ncl-talk] linear fit

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri, 6 Oct 2006 08:59:34 -0600 (MDT)

On Fri, 6 Oct 2006 tianxj_at_mail.iap.ac.cn wrote:

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

Hi Xiangjun,

There are several ways to add text to a plot.

If you want to add text to indicate something like figure numbers for
plots in a panel plot, then see example #5 at:

    http://www.ncl.ucar.edu/Applications/panel.shtml

If you want to add text to a plot using the data coordinates of the
plot to position the text string, then please see example #8 at:

   http://www.ncl.ucar.edu/Applications/text.shtml

Lastly, if you want to add text to a frame that contains a bunch of
paneled plots, but you don't necessarily want the text associated with
any particular plot (i.e. you want the text to appear say, at the
bottom of the frame), then see see example #4 at:

    http://www.ncl.ucar.edu/Applications/panel.shtml

--Mary

>>
>>
>> -----原始邮件-----
>> 从: "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:59:34 MDT

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