<div dir="ltr"><div class="gmail_default" style="font-size:small">Lillian,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The solution you came up with is pretty clever!</div><div class="gmail_default" style="font-size:small"><br>Another method is to set all values below some threshold value that you don&#39;t want contoured to missing. For example:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">threshold_val = 1.0</div><div class="gmail_default" style="font-size:small">data = where(data.lt.threshold,data@_FillVaue,data)</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">This will set all values &lt; 1.0 to missing, and hence you won&#39;t get any filled contours in these locations.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Your solution works well, too. I will try to come up with some examples on our web page, because this a common question.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 29, 2016 at 10:26 PM, 林勤芳 <span dir="ltr">&lt;<a href="mailto:cflin@cwb.gov.tw" target="_blank">cflin@cwb.gov.tw</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="ZH-TW" link="blue" vlink="purple"><div><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Hi Mary,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Thanks for your reply. The problem is solved by your suggestion.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">The test1.png is a contour plot of precipitation. The first box is set as transparent, which will look like background color white in the labelbar. However, there is no white color in the contour plot. That’s why we want to remove the first box and keep all the label values. <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">After including the following steps, the first box will be removed in test2.png:<u></u><u></u></span></p><p style="margin-left:18.0pt"><u></u><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><span>1.<span style="font:7.0pt &quot;Times New Roman&quot;">      </span></span></span><u></u><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Add one more extremely large value in cnLevels and cnFillColors.<u></u><u></u></span></p><p style="margin-left:18.0pt"><u></u><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><span>2.<span style="font:7.0pt &quot;Times New Roman&quot;">      </span></span></span><u></u><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Set cnLabelBarEndStyle = “ExcludeOuterBoxes” <u></u><u></u></span></p><p style="margin-left:18.0pt"><u></u><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><span>3.<span style="font:7.0pt &quot;Times New Roman&quot;">      </span></span></span><u></u><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Set the last string of lbLabelStrings as blank.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Lillian<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> Mary Haley [mailto:<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>] <br><b>Sent:</b> Saturday, May 28, 2016 12:40 AM<br><b>To:</b> </span><span style="font-size:10.0pt">林勤芳</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"><br><b>Cc:</b> <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br><b>Subject:</b> Re: [ncl-talk] Remoce first box in the LabelBar<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><div><div><p class="MsoNormal"><span style="font-family:&quot;MS Mincho&quot;">​</span><span lang="EN-US">Hi Lillian,<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US">Is this a labelbar that&#39;s part of a contour or vector plot, or just one that you are trying to create from scratch?<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US">Generally, if somebody is trying to remove that first box, then my suggestion is to change your contour or vector levels so that first level is not included.  But, I need to know more about what that first box represents.  Is it just a white box that you are effectively using as a way to not draw any colored contours or vectors below a certain level?<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US">You might want to check out some of our labelbar examples:<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US"><a href="http://www.ncl.ucar.edu/Applications/labelbar.shtml" target="_blank">http://www.ncl.ucar.edu/Applications/labelbar.shtml</a><u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US">In particular, example lb_12.ncl might be useful, or lb_5.ncl, which shows you how to chuck the labelbar that comes with the contour plot, and just create your own.<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US">--Mary<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div></div><div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><div><p class="MsoNormal"><span lang="EN-US">On Wed, May 25, 2016 at 3:11 AM, </span>林勤芳<span lang="EN-US"> &lt;<a href="mailto:cflin@cwb.gov.tw" target="_blank">cflin@cwb.gov.tw</a>&gt; wrote:<u></u><u></u></span></p><div><div><p class="MsoNormal"><span lang="EN-US">Hi NCL group,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">I’m trying to remove the first box in the LabelBar. It seems like the lbBoxFractions function could work. But I didn’t success. Could you help me to check the following scripts?<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">res@lbBoxCount = 3<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">res@lbBoxSizing = ”Explicitsizing”<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">res@lbBoxFractions = (/0.0, 0.0, 0.5, 1.0/)<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Thank you,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Lillian<u></u><u></u></span></p></div></div><p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US"><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" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><u></u><u></u></span></p></div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div></div></div></blockquote></div><br></div>