<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif"><dt style="margin:0px;padding:0px;line-height:13pt;font-family:verdana,arial,sans-serif;color:rgb(0,0,0)">cnLevelSpacingF still applies jn AutomaticLevels.  That is the resource you want to delete if you want NCL to also choose the spacing as well as the min/max levels.  You don&#39;t need to delete the selectionMode before resetting it.  See below for the documentation on cnLevelSpacingF. </dt><dt style="margin:0px;padding:0px;line-height:13pt;font-family:verdana,arial,sans-serif;color:rgb(0,0,0)"><span style="line-height:13pt;margin:0px;padding:0px"><a href="https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLevelSpacingF">https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLevelSpacingF</a></span><br></dt><dt style="margin:0px;padding:0px;line-height:13pt;font-weight:bold;font-family:verdana,arial,sans-serif;color:rgb(0,0,0)"><strong style="margin:0px;padding:0px;line-height:13pt"><br></strong></dt><dt style="margin:0px;padding:0px;line-height:13pt;font-weight:bold;font-family:verdana,arial,sans-serif;color:rgb(0,0,0)"><strong style="margin:0px;padding:0px;line-height:13pt"><br></strong></dt><dt style="margin:0px;padding:0px;line-height:13pt;font-weight:bold;font-family:verdana,arial,sans-serif;color:rgb(0,0,0)"><strong style="margin:0px;padding:0px;line-height:13pt">cnLevelSpacingF</strong></dt><dd style="margin:0px 0px 0px 25px;padding:0px;line-height:16px;color:rgb(0,0,0)">When the <a href="https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLevelSelectionMode" style="margin:0px;padding:0px;text-decoration:none;color:rgb(133,45,133)"><em style="margin:0px;padding:0px">cnLevelSelectionMode</em></a> is <code style="margin:0px;padding:0px">ManualLevels</code> or when the <a href="https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLevelSelectionMode" style="margin:0px;padding:0px;text-decoration:none;color:rgb(133,45,133)"><em style="margin:0px;padding:0px">cnLevelSelectionMode</em></a> is <code style="margin:0px;padding:0px">AutomaticLevels</code>, and<a href="https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLevelSpacingF" style="margin:0px;padding:0px;text-decoration:none;color:rgb(133,45,133)"><em style="margin:0px;padding:0px">cnLevelSpacingF</em></a> is explicitly set, <a href="https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLevelSpacingF" style="margin:0px;padding:0px;text-decoration:none;color:rgb(133,45,133)"><em style="margin:0px;padding:0px">cnLevelSpacingF</em></a> determines the spacing between contour intervals. Otherwise, the<a href="https://www.ncl.ucar.edu/Document/HLUs/Classes/ContourPlot.shtml" style="margin:0px;padding:0px;text-decoration:none;color:rgb(133,45,133)"><strong style="margin:0px;padding:0px">ContourPlot</strong></a> object sets the value of <a href="https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLevelSpacingF" style="margin:0px;padding:0px;text-decoration:none;color:rgb(133,45,133)"><em style="margin:0px;padding:0px">cnLevelSpacingF</em></a> based on the contour levels actually chosen. When the<a href="https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLevelSelectionMode" style="margin:0px;padding:0px;text-decoration:none;color:rgb(133,45,133)"><em style="margin:0px;padding:0px">cnLevelSelectionMode</em></a> is <code style="margin:0px;padding:0px">ExplicitLevels</code>, <a href="https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLevelSpacingF" style="margin:0px;padding:0px;text-decoration:none;color:rgb(133,45,133)"><em style="margin:0px;padding:0px">cnLevelSpacingF</em></a> will be set to the arithmetic average of the spacing between levels.<p style="margin:10px 0px 20px;padding:0px;color:rgb(51,51,51);line-height:12pt">Default: 5.0</p></dd></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 27, 2015 at 7:35 AM, Jack Ogaja <span dir="ltr">&lt;<a href="mailto:jack.ogaja@gmail.com" target="_blank">jack.ogaja@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">Try,<br>
<br>
    delete(qfres@cnLevelSelectionMode)   ;&lt;=== Delete the resource before resetting<br>
    qfres@cnLevelSelectionMode = “AutomaticLevels&quot;<br>
<span class="HOEnZb"><font color="#888888"><br>
Jack<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
&gt; On 27 Aug 2015, at 05:01, <a href="mailto:mberdahl@envsci.rutgers.edu">mberdahl@envsci.rutgers.edu</a> wrote:<br>
&gt;<br>
&gt; Hi all,<br>
&gt;<br>
&gt; I&#39;m trying to make a 3-panel plot, where the top two panels have user<br>
&gt; define contour intervals (which I can make work, I think), but the bottom<br>
&gt; panel I&#39;d like to have automatically generated.  The way I&#39;ve tried is to<br>
&gt; simply change the setting the LevelSelectionMode back to &quot;AutomaticLevels&quot;<br>
&gt; before calling that final plot, but it doesn&#39;t seem to change back to<br>
&gt; being automatic.   Here is a snippet of my code showing how I try to do<br>
&gt; this.  Any recommendations on how to switch between different modes for<br>
&gt; automatic and manual contour selection for different panels is greatly<br>
&gt; appreciated.<br>
&gt;<br>
&gt; Best,<br>
&gt; Mira<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; qfres@cnLevelSelectionMode = &quot;ManualLevels&quot;   ; set contour levels manually<br>
&gt; qfres@cnMinLevelF = 0.                                ; set hte min contour level<br>
&gt; qfres@cnMaxLevelF = 1.                                ; set the max contour level<br>
&gt; qfres@cnLevelSpacingF = 0.1                   ; set the contour interval<br>
&gt;<br>
&gt;<br>
&gt; contour_qf_hi = gsn_csm_contour(wks,qAvgTime_hi,qfres)<br>
&gt; contour_qf_lo = gsn_csm_contour(wks,qAvgTime_lo,qfres)<br>
&gt;<br>
&gt; plot(0) = gsn_csm_contour(wks,qAvgTime_hi,qfres)<br>
&gt; plot(1) = gsn_csm_contour(wks,qAvgTime_lo,qfres)<br>
&gt;<br>
&gt; qfres@cnLevelSelectionMode = &quot;AutomaticLevels&quot;        ; set it back to automatic<br>
&gt; level contour spacing for the difference plot.<br>
&gt; contour_qf_diff = gsn_csm_contour(wks,diff_q,qfres)<br>
&gt; plot(2) = gsn_csm_contour(wks,diff_q,qfres)<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; ncl-talk mailing list<br>
&gt; <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
&gt; List instructions, subscriber options, unsubscribe:<br>
&gt; <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>
_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
</div></div></blockquote></div><br></div></div>