<div dir="ltr"><div>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><font color="#000000" style="background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space" style=""> Hello:</span></span></font></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><font color="#000000" style="background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space" style=""><br></span></span></font></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><font color="#000000" style="background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space" style="">If someone has experience with using python for setting contours and label bar (boxes with labels), I can't seem to drop the right most label bar box -- it says no_label. I don't believe it should be plotted, as the contour ends at 5.</span></span></font></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><br></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><font color="#000000" style="background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">min_val = -</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">25.</span></font></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><font color="#000000" style="background-color:rgb(255,255,255)"><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span></span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">max_val</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures"> = </span><span class="gmail-s4" style="font-variant-ligatures:no-common-ligatures">5.</span></font></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><font color="#000000" style="background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span>space_val = </span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">3.</span></font></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font color="#000000"><span class="gmail-Apple-converted-space"> </span>res.cnMinLevelValF = min_val</font></span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><font color="#000000" style="background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span>res.cnMaxLevelValF = </span><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures">max_val</span></font></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font color="#000000"><span class="gmail-Apple-converted-space"> </span>res.cnLevelSpacingF = space_val</font></span></p>
<p class="gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><font color="#000000" style="background-color:rgb(255,255,255)"><span class="gmail-s6" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span>res.cnLineThicknessF = </span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">0.</span><span class="gmail-s6" style="font-variant-ligatures:no-common-ligatures"> </span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"># Don't draw contour lines</span></font></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><font color="#000000" style="background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span>res.cnLinesOn = </span><span class="gmail-s7" style="font-variant-ligatures:no-common-ligatures">False</span></font></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><font color="#000000" style="background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span>res.lbLabelBarOn = </span><span class="gmail-s7" style="font-variant-ligatures:no-common-ligatures">True</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> </span><span class="gmail-s8" style="font-variant-ligatures:no-common-ligatures">#-- draw a labelbar</span></font></p>
<p class="gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font color="#000000">#res.lbTitleString = "olr Reflectivity (dBZ)"</font></span></p>
<p class="gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font color="#000000">#res.lbTitleFontHeightF= .015<span class="gmail-Apple-converted-space"> </span></font></span></p>
<p class="gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font color="#000000">#res.lbTitleOffsetF = <span class="gmail-Apple-converted-space"> </span>-0.25 # plus is up</font></span></p>
<p class="gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font color="#000000">#res.lbTitleOffsetF = <span class="gmail-Apple-converted-space"> </span>-0.75 # plus is up</font></span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><font color="#000000" style="background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span>res.lbLabelAlignment = </span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">"BoxCenters"</span></font></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><font color="#000000" style="background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span>res.lbLabelStrings = </span><span class="gmail-s7" style="font-variant-ligatures:no-common-ligatures">list</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">(</span><span class="gmail-s7" style="font-variant-ligatures:no-common-ligatures">range</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">(-</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">25</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">,</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">5</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">,</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">3</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">))</span></font></p>
<p class="gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font color="#000000"># Calculate the levels</font></span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><font color="#000000" style="background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span>num_intervals = </span><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures">max_val</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> - min_val</span></font></p>
<p class="gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><font color="#000000" style="background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">#levels = np.linspace(min_val * space_coef, (</span><span class="gmail-s9" style="font-variant-ligatures:no-common-ligatures">max_val</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">+2) * space_coef, num_intervals + 1)[1:-1]</span></font></p>
<p class="gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><font color="#000000" style="background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">#levels = np.linspace(min_val * space_coef, </span><span class="gmail-s9" style="font-variant-ligatures:no-common-ligatures">max_val</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> * space_coef, num_intervals)</span></font></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><font color="#000000" style="background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span>levels = np.linspace(min_val , </span><span class="gmail-s5" style="font-variant-ligatures:no-common-ligatures">max_val</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">+space_val )</span></font></p>
<p class="gmail-p4" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier;min-height:23px"><font color="#000000" style="background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></font></p>
<p class="gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font color="#000000"># Convert levels to string and assign to label bar</font></span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><font color="#000000" style="background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span>string_levels = [</span><span class="gmail-s7" style="font-variant-ligatures:no-common-ligatures">str</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">(level) </span><span class="gmail-s10" style="font-variant-ligatures:no-common-ligatures">for</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> level </span><span class="gmail-s10" style="font-variant-ligatures:no-common-ligatures">in</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> levels]<span class="gmail-Apple-converted-space"> </span></span><span class="gmail-s8" style="font-variant-ligatures:no-common-ligatures"># Convert levels to strings</span></font></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font color="#000000"><span class="gmail-Apple-converted-space"> </span>res.lbLabelStrings = string_levels</font></span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:19px;line-height:normal;font-family:Courier"><font color="#000000" style="background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space"> </span></span><span class="gmail-s7" style="font-variant-ligatures:no-common-ligatures">print</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">(res.lbLabelStrings)</span></font></p></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><br></div><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior <font color="#000000">Scientist, Lecturer,</font></div><div><div><font color="#000000">The Institute of Earth Sciences, <br>The Hebrew University of Jerusalem, <br>Givat Ram, Jerusalem 91904, Israel <br></font></div><font color="#000000">Tel: 972 547 231 170<br>Fax: (972)-25662581</font></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">https://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br><br></div></div></div></div></div></div>