Hi Bahadir,
According to the dtrend_msg documentation, the rightmost dimension of
the input array will be detrended.
http://www.ncl.ucar.edu/Document/Functions/Built-in/dtrend_msg.shtml
To calculate the trend line, you need to use the slope and y_intercept
attributes that are returned from dtrend_msg. For example, looking at
your code, this would work:
trend=dtrend_msg(streamflow&year(34:65),akim,True,True)
data=new((/2,32/),typeof(akim))
data(0,:)=akim
data(1,:)= (ispan(0,31,1)*trend_at_slope)+trend_at_y_intercept
You would then pass data into the gsn_csm_xy plotting routine.
Adam
bahadır altürk wrote:
> Hello
> I have a problem with trendline. I have a simple XY plot graphic and
> would like to add linear trendline on my graphic.How can I draw linear
> trendline? can you help me?
> I attached the my plot,simple excel graphic and my ncl script. I want to
> add like a similar line with excel graphic.
>
>
>
>
> ------------------------------------------------------------------------
> Connect to the next generation of MSN Messenger Get it now!
> <http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline>
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-- -------------------------------------------------------------- Adam Phillips asphilli_at_ucar.edu National Center for Atmospheric Research tel: (303) 497-1726 ESSL/CGD/CAS fax: (303) 497-1333 P.O. Box 3000 Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli _______________________________________________ ncl-talk mailing list ncl-talk_at_ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Tue Jun 10 2008 - 11:34:01 MDT
This archive was generated by hypermail 2.2.0 : Wed Jun 11 2008 - 13:31:20 MDT