Re: trendline

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue, 10 Jun 2008 06:24:54 -0600

There are several approaches

[1]

 ncurv = 2

 data = new((/ncurv,dimsizes(y)/), typeof(y))

 data(0,:) = y ; array syntax

 data(1,:) = y_trend

 wks = gsn_open_wks ("ps","xy") ; open workstation

 res = True

 res_at_tiMainString = "Mulitple XY plot"
;res_at_xyLineThicknessF = 2 ; all lines will be twice as thick

 res_at_xyLineThicknesses = (/2.0,2.0/) ; make 1sline thicker

 res_at_xyLineColors = (/"blue","red"/) ; change line color

 plot = gsn_csm_xy (wks,x,data,res) ; create plot
=============================================

[2] draw xy and then add a line

  wks = gsn_open_wks("ps","xy")

  res = True ; plot mods desired

  res_at_gsnFrame = False ; don't draw yet

 ;res_at_gsnDraw = False ; don't advance frame

  plot = gsn_csm_xy(wks,x,y,res) ; draw y plot

  polyres = True
 ;polyres@....
 

  gsn_polyline(wks,plot,x,ytrend,polyres)

  frame(wks)

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jun 10 2008 - 06:24:54 MDT

This archive was generated by hypermail 2.2.0 : Wed Jun 11 2008 - 13:31:20 MDT