<div dir="ltr">Hi Sun,<div>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><span style="font-family:Helvetica;font-size:12px">pltarry(1,:) = rc*(calextd-rc@xave) + rc@yintercept  </span></div><div><span style="font-family:Helvetica;font-size:12px">pltarry1(1,:) = rc*(camMextd-rc@xave) + rc@yintercept</span></div><div><span style="font-family:Helvetica;font-size:12px">pltarry2(1,:) = rc*(camextd-rc@xave) + rc@yintercept </span></div><div><br></div><div>I think those lines should read like this:</div><div><div><span style="font-family:Helvetica;font-size:12px">pltarry(1,:) = rc*(calextd-rc@xave) + rc@yintercept  </span></div><div><span style="font-family:Helvetica;font-size:12px">pltarry1(1,:) = rc1*(camMextd-rc1@xave) + rc1@yintercept</span></div><div><span style="font-family:Helvetica;font-size:12px">pltarry2(1,:) = rc2*(camextd-rc2@xave) + rc2@yintercept </span></div></div><div><br></div><div>If you have any further questions please let ncl-talk know.</div><div>Adam</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 2, 2016 at 8:48 PM, mireiyue <span dir="ltr">&lt;<a href="mailto:mireiyue@gmail.com" target="_blank">mireiyue@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"></div><br><div style="word-wrap:break-word"><br><div><blockquote type="cite"><div>On Mar 2, 2016, at 3:01 PM, Adam Phillips &lt;<a href="mailto:asphilli@ucar.edu" target="_blank">asphilli@ucar.edu</a>&gt; wrote:</div><br><div><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">Hi Sun,<div>(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  and gsnFrame = True, and send the resulting 4 images to the ncl-talk email list so all can see? </div><div>Thanks,</div><div>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><div class="gmail_quote">On Wed, Mar 2, 2016 at 2:47 PM, mireiyue<span> </span><span dir="ltr">&lt;<a href="mailto:mireiyue@gmail.com" target="_blank">mireiyue@gmail.com</a>&gt;</span><span> </span>wrote:<br><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><br>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.  How I can plot all three regression lines in one plot? I do appreciate any helps!! Thank you!!<br><br>Sun-<br><br> rc =  regline_stats(calextd,merracmf)<br> print(rc)<br> pltarry   = new((/2,dimsizes(calextd)/),typeof(calextd))<br> pltarry(0,:) = merracmf                                ; use markers<br> pltarry(1,:) = rc*(calextd-rc@xave) + rc@yintercept          ; use solid line<br> printVarSummary(pltarry)<br><br> rc1 = regline_stats(camMextd,camMcmf)<br> print(rc1)<br> pltarry1   = new((/2,dimsizes(camMextd)/),typeof(camMextd))<br> pltarry1(0,:) = camMcmf                                ; use markers<br> pltarry1(1,:) = rc*(camMextd-rc@xave) + rc@yintercept          ; use solid line<br> printVarSummary(pltarry1)<br><br> rc2 = regline_stats(camextd,camcmf)<br> print(rc2)<br> pltarry2   = new((/2,dimsizes(camextd)/),typeof(camextd))<br> pltarry2(0,:) = camcmf                                ; use markers<br> pltarry2(1,:) = rc*(camextd-rc@xave) + rc@yintercept          ; use solid line<br> printVarSummary(pltarry2)<br><br>wks   = gsn_open_wks(&quot;eps&quot;,&quot;Global&quot;)<br>res                   = True                     ; plot mods desired<br>res@gsnDraw     = False      ; Will draw later, after overlaying<br>res@gsnFrame    = False      ; all plots<br>; res@gsnMaximize       = False<br>res@trXMinF              = 0.<br>res@trYMinF              = 0.<br><br>res@xyMarkLineModes   = (/“Markers”,”Lines”/) ; choose which have markers<br>res@xyExplicitLegendLabels = “A&quot;<br>res@pmLegendParallelPosF   = 0.35<br>res@xyMarkers         = &quot;16&quot;                     ; choose type of marker<br>res@xyMarkerColor     = &quot;darkgreen&quot;              ; Marker color<br>res@xyMarkerSizeF       = 0.01                  ; Marker size (default 0.01)<br>res@xyLineColor         = &quot;black&quot;<br>res@xyLineThicknesses   = 1 ;(/1,2/)<br>res@xyDashPatterns      = 0                      ; solid line<br>plot2  = gsn_csm_xy (wks,calextd,pltarry(0:1,:),res)<br><br>res@xyMarkers         = &quot;7&quot;                     ; choose type of marker<br>res@xyMarkerColor     = &quot;blue&quot;              ; Marker color<br>res@xyMarkerSizeF       = 0.01                  ; Marker size (default 0.01)<br>res@xyExplicitLegendLabels = “B&quot;<br>res@pmLegendParallelPosF   = 0.79<br>res@xyLineColor         = &quot;red&quot;<br>res@xyLineThicknesses   = 1 ;(/1,2/)<br>res@xyDashPatterns      = 0                      ; solid line<br>plot1  = gsn_csm_xy (wks,camMextd,pltarry1(0:1,:),res)<br><br>res@xyExplicitLegendLabels = “C&quot;<br>res@pmLegendParallelPosF   = 1.2<br>res@xyMarkers         = &quot;12&quot;                     ; choose type of marker<br>res@xyMarkerColor     = &quot;red&quot;              ; Marker color<br>res@xyMarkerSizeF       = 0.01                  ; Marker size (default 0.01)<br>res@xyLineColor         = &quot;blue&quot;<br>res@xyLineThicknesses   = 1 ;(/1,2/)<br>res@xyDashPatterns      = 0                      ; solid line<br>plot =gsn_csm_xy (wks,camextd,pltarry2(0:1,:),res)<br><br>overlay(plot,plot1)<br>overlay(plot,plot2)<br>draw(plot)            ; This will draw all four plots<br><br><br>_______________________________________________<br>ncl-talk mailing list<br><a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>List instructions, subscriber options, unsubscribe:<br><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br><br></blockquote></div><br><br clear="all"><div><br></div>--<span> </span><br><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips<span> </span><br></font></span></div><span><font color="#888888">Associate Scientist, <span> </span></font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>  <span> </span></font></span><span><font color="#888888"><a href="tel:303-497-1726" value="+13034971726" target="_blank">303-497-1726</a><span> </span></font></span></div></div></div></div></div></div></div></div></div></div></div></blockquote></div><br></div><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist,  </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>   </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</div>