<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Jonathan,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The gsn_csm_attach_zonal_means_plot is really meant for just one zonal means, and doesn't have any hooks for extra lines.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">There's unadvertised function called gsn_csm_zonal_means which is called by the gsn_csm_attach_zonal_means plot. It basically creates the XY zonal means plot under the hood and returns it. The gsn_csm_attach_zonal_means function calls this function and then attaches the zonal plot to the right of an existing map plot.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default">Using gsn_csm<font face="arial, helvetica, sans-serif" color="#000000">_zonal_means, I created the two zonal means plots myself, used "overlay" to overlay them into one plot, and then attached the overlaid XY plots myself using gsn_add_annotation.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" color="#000000"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif" color="#000000">See the attached zonal.ncl example and resultant PNG image. I didn't have time to find a dataset that would produce a more interesting zonal plot, so I just used a standard one that you can download from:</font></div><div class="gmail_default">
<p class="gmail-p1"><font face="arial, helvetica, sans-serif" color="#000000"><a href="http://www.ncl.ucar.edu/Applications/Data/cdf/ts_Amon_CESM1-CAM5_historical_r1i1p1_185001-200512.nc">http://www.ncl.ucar.edu/Applications/Data/cdf/ts_Amon_CESM1-CAM5_historical_r1i1p1_185001-200512.nc</a></font></p><p class="gmail-p1"><font face="arial, helvetica, sans-serif" color="#000000">You will likely want to modify the "<span style="font-variant-ligatures:no-common-ligatures">attach_zonal_plots_to_map_plot" function in this script to customize how you want the zonal means plots to appear, for example, what color to use for the XY lines, how wide to make the plot, what X/Y axes min/max values you want, etc.</span></font></p><p class="gmail-p1"><font face="arial, helvetica, sans-serif" color="#000000"><span style="font-variant-ligatures:no-common-ligatures">--Mary</span></font></p><p class="gmail-p1"><font face="arial, helvetica, sans-serif" color="#000000"><span style="font-variant-ligatures:no-common-ligatures"><br></span></font></p>
</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 2, 2016 at 2:44 PM, Buzan, Jonathan R <span dir="ltr"><<a href="mailto:jbuzan@purdue.edu" target="_blank">jbuzan@purdue.edu</a>></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">
Hi NCL,
<div><br>
</div>
<div>I am attempting to plot zonal means of my two sets of data. However, every time it tries to plot the zonal means, even with the same trXMaxF and trXMinF, the zonal plots do not match on the same grid (see attached). Is there a way to fix this?</div>
<div><br>
</div>
<div>-Jonathan</div>
<div><br>
</div>
<div><br>
</div>
<div>ex. plot lines.</div>
<div><br>
</div>
<div> zres@trXMinF = 0. ; Could also use gsnZonalMeanXMinF<br>
zres@trXMaxF = 3. ; Could also use gsnZonalMeanXMaxF<br>
zres@trYMinF = -57<br>
zres@trYMaxF = 57<br>
zres1@trXMinF = 0. ; Could also use gsnZonalMeanXMinF<br>
zres1@trXMaxF = 3. ; Could also use gsnZonalMeanXMaxF<br>
zres1@trYMinF = -57<br>
zres1@trYMaxF = 57<br>
</div>
<div><br>
</div>
plots = gsn_csm_contour_map(wks,tmp_<wbr>var(:,:),res)<br>
plots1 = gsn_csm_contour(wks,tmp_var1(:<wbr>,:),res2)<br>
plots1 = gsn_contour_shade(plots1,<wbr>minshade,maxshade,opt)<br>
overlay(plots,plots1)<br>
zonal_id1 = gsn_csm_attach_zonal_means(<wbr>wks,plots,tmp_var1(:,:),zres)<br>
<div> zonal_id2 = gsn_csm_attach_zonal_means(<wbr>wks,plots,tmp_var(:,:),zres1)<br>
</div>
<div><img id="m_5850261746011525731E79FF919-DDAD-42E9-9479-06B2732AC31E" height="443" width="573" src="cid:1D9532AA-ECDC-42AF-AA83-BD649287567F"></div>
</div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>