<div dir="ltr"><div><a href="http://www.ncl.ucar.edu/Applications/regress.shtml">http://www.ncl.ucar.edu/Applications/regress.shtml</a><br>===========<br></div><div>rc=regCoef(x,y(lat|:,lon|:,time|:))</div><div><br></div><div>;dimensions</div><div>rc!0="lat"</div><div>rc!1="lon"</div><div>;coordinates</div><div>rc&lat=lat</div><div>rc&lon=lon<br><br><pre>************************************************
; plotting parameters: Example 2
;************************************************
wks = gsn_open_wks("ps" ,"regress")
gsn_define_colormap(wks,"ViBlGrWhYeOrRe") ; choose colormap
res = True
res@gsnMaximize = True ; make large
res@cnFillOn = True ; turn on color
res@cnLinesOn = False ; turn off contour lines
res@cnLineLabelsOn = False ; turn off contour line labels
res@cnFillMode = "RasterFill"
res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
res@cnMinLevelValF = -1.00 ; set min contour level
res@cnMaxLevelValF = 1.00 ; set max contour level
res@cnLevelSpacingF = 0.10 ; set contour interval
res@mpFillOn = False ; turn off default background gray
res@mpCenterLonF = 210
;res@tiMainString = fili
plot = gsn_csm_contour_map_ce(wks,rc,res) </pre><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 15, 2014 at 12:00 PM, Rainer Luptowitz <span dir="ltr"><<a href="mailto:rlupt001@ucr.edu" target="_blank">rlupt001@ucr.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, <div><br></div><div>How do you plot a regression coefficient line on an x,y plot and spatial map?</div><div>If you have </div><div><br></div><div>x=time (years) </div><div>y=precipitation rate (mm/s).</div><div><br></div><div>rc=regCoef(x,y(lat|:,lon|:,time|:))</div><div><br></div><div>;dimensions</div><div>rc!0="lat"</div><div>rc!1="lon"</div><div>;rc!time="time"</div><div>;coordinates</div><div>rc&lat=lat</div><div>rc&lon=lon</div><div>;rc&time=time</div><div><br></div><div>printVarSummary(rc)</div><div>print("rc MinMax")</div><div>printMinMax(rc,0)</div><div><br></div><div>I tried to create </div><div><br></div><div>y=mx+b </div><div><br></div><div>but the right hand side couldn't be coerced to the left hand side. So I'm not sure if this is the way to set up the plot parameters for </div><div><br></div><div>plot=gsn_csm_xy(wks,x,y,res)</div><div><br></div><div>If someone could explain how to go about plotting an 'xy plot' and 'spatial contour map' of the regression coefficient it would be most helpful.</div><div><br></div><div>Thank you,</div><div><br clear="all"><div><div dir="ltr">Rainer Luptowitz<div><div><br></div></div></div></div>
</div></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>