<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Thank you Adam!!<div class="">Sun-</div><div class=""><br class=""><div class=""><div><blockquote type="cite" class=""><div class="">On Mar 3, 2016, at 8:41 AM, Adam Phillips &lt;<a href="mailto:asphilli@ucar.edu" class="">asphilli@ucar.edu</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Sun,<div class="">It looks to me like all three of the regression lines (shown on Global.pdf, Global1.pdf and Global2.pdf) look quite similar if not the same, as they all run from (0.0,0.001) to (0.3,0.0). Thus, the composite plot (Global3.pdf) might be showing all 3 lines. Looking at your coding you have these three lines that all use rc to construct the regression lines:</div><div class=""><span style="font-family:Helvetica;font-size:12px" class="">pltarry(1,:) = rc*(calextd-rc@xave) + rc@yintercept &nbsp;</span></div><div class=""><span style="font-family:Helvetica;font-size:12px" class="">pltarry1(1,:) = rc*(camMextd-rc@xave) + rc@yintercept</span></div><div class=""><span style="font-family:Helvetica;font-size:12px" class="">pltarry2(1,:) = rc*(camextd-rc@xave) + rc@yintercept&nbsp;</span></div><div class=""><br class=""></div><div class="">I think those lines should read like this:</div><div class=""><div class=""><span style="font-family:Helvetica;font-size:12px" class="">pltarry(1,:) = rc*(calextd-rc@xave) + rc@yintercept &nbsp;</span></div><div class=""><span style="font-family:Helvetica;font-size:12px" class="">pltarry1(1,:) = rc1*(camMextd-rc1@xave) + rc1@yintercept</span></div><div class=""><span style="font-family:Helvetica;font-size:12px" class="">pltarry2(1,:) = rc2*(camextd-rc2@xave) + rc2@yintercept&nbsp;</span></div></div><div class=""><br class=""></div><div class="">If you have any further questions please let ncl-talk know.</div><div class="">Adam</div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Mar 2, 2016 at 8:48 PM, mireiyue <span dir="ltr" class="">&lt;<a href="mailto:mireiyue@gmail.com" target="_blank" class="">mireiyue@gmail.com</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""></div><br class=""><div style="word-wrap:break-word" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 2, 2016, at 3:01 PM, Adam Phillips &lt;<a href="mailto:asphilli@ucar.edu" target="_blank" class="">asphilli@ucar.edu</a>&gt; wrote:</div><br class=""><div class=""><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">Hi Sun,<div class="">(Please always include the ncl-talk email list on any replies.) As you do have a frame(wks) call at the end of your script, can you set gsnDraw &nbsp;and gsnFrame = True, and send the resulting 4 images to the ncl-talk email list so all can see?&nbsp;</div><div class="">Thanks,</div><div class="">Adam</div></div><div class="gmail_extra" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br class=""><div class="gmail_quote">On Wed, Mar 2, 2016 at 2:47 PM, mireiyue<span class="">&nbsp;</span><span dir="ltr" class="">&lt;<a href="mailto:mireiyue@gmail.com" target="_blank" class="">mireiyue@gmail.com</a>&gt;</span><span class="">&nbsp;</span>wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Dear NCL users<br class=""><br class="">I am trying to plot three different data with three regression lines in one plot. I can plot all data in one plot but the regression line only plot the first one.&nbsp; How I can plot all three regression lines in one plot? I do appreciate any helps!! Thank you!!<br class=""><br class="">Sun-<br class=""><br class="">&nbsp;rc =&nbsp; regline_stats(calextd,merracmf)<br class="">&nbsp;print(rc)<br class="">&nbsp;pltarry&nbsp; &nbsp;= new((/2,dimsizes(calextd)/),typeof(calextd))<br class="">&nbsp;pltarry(0,:) = merracmf&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; use markers<br class="">&nbsp;pltarry(1,:) = rc*(calextd-rc@xave) + rc@yintercept&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; use solid line<br class="">&nbsp;printVarSummary(pltarry)<br class=""><br class="">&nbsp;rc1 = regline_stats(camMextd,camMcmf)<br class="">&nbsp;print(rc1)<br class="">&nbsp;pltarry1&nbsp; &nbsp;= new((/2,dimsizes(camMextd)/),typeof(camMextd))<br class="">&nbsp;pltarry1(0,:) = camMcmf&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; use markers<br class="">&nbsp;pltarry1(1,:) = rc*(camMextd-rc@xave) + rc@yintercept&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; use solid line<br class="">&nbsp;printVarSummary(pltarry1)<br class=""><br class="">&nbsp;rc2 = regline_stats(camextd,camcmf)<br class="">&nbsp;print(rc2)<br class="">&nbsp;pltarry2&nbsp; &nbsp;= new((/2,dimsizes(camextd)/),typeof(camextd))<br class="">&nbsp;pltarry2(0,:) = camcmf&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; use markers<br class="">&nbsp;pltarry2(1,:) = rc*(camextd-rc@xave) + rc@yintercept&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; use solid line<br class="">&nbsp;printVarSummary(pltarry2)<br class=""><br class="">wks&nbsp; &nbsp;= gsn_open_wks("eps","Global")<br class="">res&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= True&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; plot mods desired<br class="">res@gsnDraw&nbsp; &nbsp; &nbsp;= False&nbsp; &nbsp; &nbsp; ; Will draw later, after overlaying<br class="">res@gsnFrame&nbsp; &nbsp; = False&nbsp; &nbsp; &nbsp; ; all plots<br class="">; res@gsnMaximize&nbsp; &nbsp; &nbsp; &nbsp;= False<br class="">res@trXMinF&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 0.<br class="">res@trYMinF&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 0.<br class=""><br class="">res@xyMarkLineModes&nbsp; &nbsp;= (/“Markers”,”Lines”/) ; choose which have markers<br class="">res@xyExplicitLegendLabels = “A"<br class="">res@pmLegendParallelPosF&nbsp; &nbsp;= 0.35<br class="">res@xyMarkers&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= "16"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; choose type of marker<br class="">res@xyMarkerColor&nbsp; &nbsp; &nbsp;= "darkgreen"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; Marker color<br class="">res@xyMarkerSizeF&nbsp; &nbsp; &nbsp; &nbsp;= 0.01&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; Marker size (default 0.01)<br class="">res@xyLineColor&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= "black"<br class="">res@xyLineThicknesses&nbsp; &nbsp;= 1 ;(/1,2/)<br class="">res@xyDashPatterns&nbsp; &nbsp; &nbsp; = 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; solid line<br class="">plot2&nbsp; = gsn_csm_xy (wks,calextd,pltarry(0:1,:),res)<br class=""><br class="">res@xyMarkers&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= "7"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; choose type of marker<br class="">res@xyMarkerColor&nbsp; &nbsp; &nbsp;= "blue"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; Marker color<br class="">res@xyMarkerSizeF&nbsp; &nbsp; &nbsp; &nbsp;= 0.01&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; Marker size (default 0.01)<br class="">res@xyExplicitLegendLabels = “B"<br class="">res@pmLegendParallelPosF&nbsp; &nbsp;= 0.79<br class="">res@xyLineColor&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= "red"<br class="">res@xyLineThicknesses&nbsp; &nbsp;= 1 ;(/1,2/)<br class="">res@xyDashPatterns&nbsp; &nbsp; &nbsp; = 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; solid line<br class="">plot1&nbsp; = gsn_csm_xy (wks,camMextd,pltarry1(0:1,:),res)<br class=""><br class="">res@xyExplicitLegendLabels = “C"<br class="">res@pmLegendParallelPosF&nbsp; &nbsp;= 1.2<br class="">res@xyMarkers&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= "12"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; choose type of marker<br class="">res@xyMarkerColor&nbsp; &nbsp; &nbsp;= "red"&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; Marker color<br class="">res@xyMarkerSizeF&nbsp; &nbsp; &nbsp; &nbsp;= 0.01&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; Marker size (default 0.01)<br class="">res@xyLineColor&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= "blue"<br class="">res@xyLineThicknesses&nbsp; &nbsp;= 1 ;(/1,2/)<br class="">res@xyDashPatterns&nbsp; &nbsp; &nbsp; = 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; solid line<br class="">plot =gsn_csm_xy (wks,camextd,pltarry2(0:1,:),res)<br class=""><br class="">overlay(plot,plot1)<br class="">overlay(plot,plot2)<br class="">draw(plot)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; This will draw all four plots<br class=""><br class=""><br class="">_______________________________________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class=""><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank" class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br class=""><br class=""></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>--<span class="">&nbsp;</span><br class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><span class=""><font color="#888888" class="">Adam Phillips<span class="">&nbsp;</span><br class=""></font></span></div><span class=""><font color="#888888" class="">Associate Scientist,&nbsp;<span class="">&nbsp;</span></font></span><span class=""><font color="#888888" class="">Climate and Global Dynamics Laboratory, NCAR<br class=""></font></span></div></div><div class=""><span class=""><font color="#888888" class=""><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank" class="">www.cgd.ucar.edu/staff/asphilli/</a>&nbsp;&nbsp;<span class="">&nbsp;</span></font></span><span class=""><font color="#888888" class=""><a href="tel:303-497-1726" value="+13034971726" target="_blank" class="">303-497-1726</a><span class="">&nbsp;</span></font></span></div></div></div></div></div></div></div></div></div></div></div></blockquote></div><br class=""></div><br class=""></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><span class=""><font color="#888888" class="">Adam Phillips <br class=""></font></span></div><span class=""><font color="#888888" class="">Associate Scientist,&nbsp; </font></span><span class=""><font color="#888888" class="">Climate and Global Dynamics Laboratory, NCAR<br class=""></font></span></div></div><div class=""><span class=""><font color="#888888" class=""><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank" class="">www.cgd.ucar.edu/staff/asphilli/</a>&nbsp;&nbsp; </font></span><span class=""><font color="#888888" class="">303-497-1726 </font></span></div><span class=""><font color="#888888" class=""></font></span><div class=""><div class=""><span class=""><font color="#888888" class=""><br class=""></font></span><div class=""><span class=""><font color="#888888" class=""><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank" class=""></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</div>
</div></blockquote></div><br class=""></div></div></body></html>