<div dir="ltr">Hello:<div><br></div><div>Thank you for the suggestion.</div><div><br></div><div>I've tried a few things, but the problem I have is that I need the labels to be equal to the values in the variable "intervals."</div><div><br></div><div>
<span></span>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(230,230,0)">interval</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">s = ((/8,12,18,24,30,36,50,75,100/))</span></p><p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures"><br></span></p><p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">where the right most value displayed on the histogram is 75.</span></p><p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures"><br></span></p><p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">I tried setting </span></p><p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures"><br></span></p><p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">
<span></span>
</span></p><p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">res@gsnHistogramDiscreteBinValues<span class="gmail-Apple-converted-space"> </span>= intervals</span></p>
<br><p></p><p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">but I get this error.</span></p><p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">
<span></span>
</span></p><p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">0)<span class="gmail-Apple-tab-span" style="white-space:pre"> </span>Error: gsn_histogram: The bin values you picked are out of range. No plot will be drawn.</span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">(0)<span class="gmail-Apple-tab-span" style="white-space:pre"> </span>Error: gsn_histogram: The bin values you picked are out of range. No plot will be drawn.</span></p>
<br><p></p><p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">If I set the discrete values this way, I get this error.</span></p><p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures"><br></span></p><p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">
<span></span>
</span></p><p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">res@gsnHistogramDiscreteBinValues<span class="gmail-Apple-converted-space"> </span>= ispan(intervals(0),intervals(n_int-1),1)</span></p>
<br><p></p><p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures"><br></span></p><p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures">
<span></span>
</span></p><p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">0)<span class="gmail-Apple-tab-span" style="white-space:pre"> </span>Error: gsn_histogram: The bin values you picked are out of range. No plot will be drawn.</span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">(0)<span class="gmail-Apple-tab-span" style="white-space:pre"> </span>Error: gsn_histogram: The bin values you picked are out of range. No plot will be drawn.</span></p>
<br><p></p>
<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 19, 2018 at 6:16 PM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Barry,</div><div class="gmail_default" style="font-size:small"><div class="gmail_default" style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><br class="m_-3117706835302933185gmail-Apple-interchange-newline">The reason why those particular labels are directly centered under the bars is because discrete values are being used. That is, the histogram is counting the number of values *equal* to specific values, rather than in a range of values. You can see this from looking at this resource setting in the histo_3.ncl code:</div><div class="gmail_default" style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><br></div><div class="gmail_default" style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"> res@<wbr>gsnHistogramDiscreteBinValues = ispan(0,25,1)</div><br></div><div class="gmail_default" style="font-size:small"><div class="gmail_default" style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">This will bin the values by counting the number of values exactly equal to 0, exactly equal to 1, and so on up to 25.</div><br></div><div class="gmail_default" style="font-size:small">The labels under the tickmarks are not labelbar tickmarks, since there is no labelbar in this case. These bars are drawn using filled polygons and not labelbars.</div><div class="gmail_default"><br></div><div class="gmail_default">To change these labels, you need to set tickmark (tm) resources, in particular, tmXBLabels. Here, I'm adding an equal sign to the front of every value:</div><div class="gmail_default"><br></div><font face="monospace, monospace"> res@tmXBLabels = "=" + res@<wbr>gsnHistogramDiscreteBinValues<br> res@tmXBLabelFontHeightF = 0.01<br> res@tmXBLabelStride = 1</font><div class="gmail_default" style="font-size:small">
<br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Note that I also set tmXBLabelStride to 1, because in histo_3.ncl, only every other bar was labeled.</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 class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Sun, Mar 18, 2018 at 11:09 PM, Barry Lynn <span dir="ltr"><<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi:<div><br></div><div><div><a href="https://www.ncl.ucar.edu/Applications/histo.shtml" target="_blank">https://www.ncl.ucar.edu/Appli<wbr>cations/histo.shtml</a><br></div><div><br></div><div>is histogram where the labels appear under the bars.</div><div><br></div><div>However, I can't seem to find the setting for this.</div><div><br></div><div>The default appears to be between</div><div><br></div><div>and:
<span></span>
<p class="m_-3117706835302933185m_2244277422762582141gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-3117706835302933185m_2244277422762582141gmail-s1" style="font-variant-ligatures:no-common-ligatures">res@lbLabelAlignment <span class="m_-3117706835302933185m_2244277422762582141gmail-Apple-converted-space"> </span>= "BoxCenters"</span></p><p class="m_-3117706835302933185m_2244277422762582141gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-3117706835302933185m_2244277422762582141gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></p><p class="m_-3117706835302933185m_2244277422762582141gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-3117706835302933185m_2244277422762582141gmail-s1" style="font-variant-ligatures:no-common-ligatures">is not a recognized resource,</span></p><p class="m_-3117706835302933185m_2244277422762582141gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_-3117706835302933185m_2244277422762582141gmail-s1" style="font-variant-ligatures:no-common-ligatures">so changing this to ExteriorEdges doesn't help.</span></p>
</div><div><br></div><div>Thank you,</div><div><br></div><div>Barry</div>-- <br><div class="m_-3117706835302933185m_2244277422762582141gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://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>US <a href="tel:(914)%20432-3108" value="+19144323108" target="_blank">914 432 3108</a><br></div></div></div>
</div></div>
<br></div></div>______________________________<wbr>_________________<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/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://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>US 914 432 3108<br></div></div></div>
</div>