<div dir="ltr"><div class="gmail_default" style="font-size:small">Barry,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I've updated the histogram examples page to more clearly state how to get the exact intervals you want in a histogram. See example histo_2.ncl (and others) at:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Applications/histo.shtml">http://www.ncl.ucar.edu/Applications/histo.shtml</a><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Since you didn't specify the actual bins you wanted gsn_histogram to use, NCL chose a default of these bins:<br></div><div class="gmail_default">
<p class="gmail-m_5966570251754122331gmail-p1" style="font-size:small"><span class="gmail-m_5966570251754122331gmail-s1">(<span class="gmail-m_5966570251754122331gmail-Apple-converted-space"> </span>0, 2.5,<span class="gmail-m_5966570251754122331gmail-Apple-converted-space"> </span>5, 7.5, 10, 12.5, 15, 17.5, 20, 22.5 )</span></p><p class="gmail-m_5966570251754122331gmail-p1" style="font-size:small">You can see these values by printing the value returned from gsn_histogram and looking at the BinLocs attribute:<br></p><p class="gmail-m_5966570251754122331gmail-p1"><font face="monospace, monospace"> plot = gsn_histogram(wks,x,res)<br> print(plot) <span style="white-space:pre-wrap"> </span> ; this prints everything attached to plot print(plot@BinLocs) ; the actual bin ranges used </font></p></div><div class="gmail_default" style="font-size:small">To set the bin values yourself:</div><div class="gmail_default" style="font-size:small"><span class="gmail-s1"><span class="gmail-Apple-converted-space"><br> </span>res@</span><span class="gmail-s2">gsnHistogramBinIntervals</span><span class="gmail-s1"> = int_radar</span><br></div><div class="gmail_default" style="font-size:small"><span class="gmail-s1"><br></span></div><div class="gmail_default" style="font-size:small"><span class="gmail-s1"><br></span></div><div class="gmail_default" style="font-size:small"><span class="gmail-s1">BTW, you want to stay away from do loops as much as possible. I'm not sure what these loops are supposed to be calculating:</span></div><div class="gmail_default" style="font-size:small"><span class="gmail-s1"><br></span></div><div class="gmail_default" style="font-size:small"><span class="gmail-s1"><div class="gmail_default"> obs_x = new(dims_num_o-1,float)</div><div class="gmail_default"> mod_x = new(dims_num_m-1,float)</div></span></div><div class="gmail_default" style="font-size:small"><span class="gmail-s1"><div class="gmail_default"> ii_int = 0</div><div class="gmail_default"> do i_int = 1,dims_num_o-1</div><div class="gmail_default"> obs_x(ii_int) = num_o(i_int)</div><div class="gmail_default"> ii_int = ii_int + 1</div><div class="gmail_default"> end do</div><div class="gmail_default"> ii_int = 0</div><div class="gmail_default"> do i_int = 1,dims_num_m-1</div><div class="gmail_default"> mod_x(ii_int) = num_m(i_int)</div><div class="gmail_default"> ii_int = ii_int + 1</div><div class="gmail_default"> end do</div></span></div><div class="gmail_default"><p class="gmail-p1" style="font-size:small">but this can be rewritten as two lines of code: </p><p class="gmail-p1" style="font-size:small"> obs_x = num_o(1:)<br> mod_x = num_m(1:)</p><p class="gmail-p1" style="font-size:small">--Mary</p><p class="gmail-p1" style="font-size:small"><br></p></div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 20, 2017 at 6:01 AM, Barry Lynn <span dir="ltr"><<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@gmail.com</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">Hi:<div><br></div><div>I can get the labels to display correctly if I use:</div><div><br></div><div>
<p class="m_4950544652927458203gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_4950544652927458203gmail-s1" style="font-variant-ligatures:no-common-ligatures">res@tmXBLabels = int_radar(::3)</span></p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_4950544652927458203gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:"Courier New";background-color:rgb(255,255,255)"><span class="m_4950544652927458203gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font color="#000000">However, the histogram program is amalgamating the smaller bins into 10 sized default bins.</font></span></p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:"Courier New";background-color:rgb(255,255,255)"><span class="m_4950544652927458203gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font color="#000000"><br></font></span></p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-stretch:normal;line-height:normal;background-color:rgb(255,255,255)"><span class="m_4950544652927458203gmail-s1"><font color="#000000"><font face="Courier New"><span style="font-variant-ligatures:no-common-ligatures">I would hope that there is a way to explicitly tell the histogram program to use all the interval data (23 intervals.</span></font></font></span></p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-stretch:normal;line-height:normal;background-color:rgb(255,255,255)"><span class="m_4950544652927458203gmail-s1"><font color="#000000"><font face="Courier New"><span style="font-variant-ligatures:no-common-ligatures"><br></span></font></font></span></p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-stretch:normal;line-height:normal;background-color:rgb(255,255,255)"><span class="m_4950544652927458203gmail-s1"><font color="#000000"><font face="Courier New"><span style="font-variant-ligatures:no-common-ligatures">I tried setting:</span></font></font></span></p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-stretch:normal;line-height:normal;background-color:rgb(255,255,255)"><span class="m_4950544652927458203gmail-s1"><font color="#000000"><font face="Courier New"><span style="font-variant-ligatures:no-common-ligatures"><br></span></font></font></span></p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-stretch:normal;line-height:normal;background-color:rgb(255,255,255)"><span class="m_4950544652927458203gmail-s1">
</span></p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_4950544652927458203gmail-s1" style="font-variant-ligatures:no-common-ligatures">res@tmXBMode<span class="m_4950544652927458203gmail-Apple-converted-space"> </span>= "</span><span class="m_4950544652927458203gmail-s2" style="font-variant-ligatures:no-common-ligatures;background-color:rgb(230,230,0)">Manu</span><span class="m_4950544652927458203gmail-s1" style="font-variant-ligatures:no-common-ligatures">al"</span><br></p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)">and creating manual tick marks, but then my histogram labels go only from 0 to 1.</p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)">As below.</p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_4950544652927458203gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_4950544652927458203gmail-Apple-converted-space"> </span>rad_inc = 3./(int_radar(dimsizes(int_<wbr>radar)-1)+10)</span></p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_4950544652927458203gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_4950544652927458203gmail-Apple-converted-space"> </span>print("rad_inc<span class="m_4950544652927458203gmail-Apple-converted-space"> </span>= " +rad_inc)</span></p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_4950544652927458203gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_4950544652927458203gmail-Apple-converted-space"> </span>new_ticks = new(dimsizes(int_radar),float)</span></p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_4950544652927458203gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_4950544652927458203gmail-Apple-converted-space"> </span>new_ticks(0)= 0</span></p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_4950544652927458203gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_4950544652927458203gmail-Apple-converted-space"> </span>do inc = 1,dimsizes(int_radar)-1,1</span></p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_4950544652927458203gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_4950544652927458203gmail-Apple-converted-space"> </span>new_ticks(inc) = new_ticks(inc-1)+rad_inc</span></p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_4950544652927458203gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_4950544652927458203gmail-Apple-converted-space"> </span>end do</span></p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_4950544652927458203gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_4950544652927458203gmail-Apple-converted-space"> </span>print("new_ticks = " + new_ticks)</span></p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_4950544652927458203gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_4950544652927458203gmail-Apple-converted-space"> </span>res@tmXBValues := new_ticks</span></p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)">
</p><p class="m_4950544652927458203gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:"Courier New";color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="m_4950544652927458203gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_4950544652927458203gmail-Apple-converted-space"> </span>res@tmXBLabels := int_radar</span></p></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 19, 2017 at 9:21 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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi:<div><br></div><div>I am having trouble figuring out why my histo.ncl program won't plot data beyond value (x-axis) of 15. This is really dbz data, so the range is correct: -9 to 60. </div><div><br></div><div>I also checked that the labels are present in:</div><div><br></div><div>
<p class="m_4950544652927458203m_-63047193133136743gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps: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_4950544652927458203m_-63047193133136743gmail-s1" style="font-variant-ligatures:no-common-ligatures">res@tmXBLabels = int_radar</span></p><p class="m_4950544652927458203m_-63047193133136743gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps: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_4950544652927458203m_-63047193133136743gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></p><p class="m_4950544652927458203m_-63047193133136743gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps: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_4950544652927458203m_-63047193133136743gmail-s1" style="font-variant-ligatures:no-common-ligatures">and the data dimensions are correct (23 elements).</span></p></div><div><br></div><div>However, I don't see any data (and any labels 18-60) indicating that the data has all been displayed. </div><div><br></div><div>Thank you,</div><div><br></div><div>Barry<br clear="all"><div><br></div>-- <br><div class="m_4950544652927458203m_-63047193133136743gmail_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>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_4950544652927458203gmail_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 <a href="tel:(914)%20432-3108" value="+19144323108" target="_blank">914 432 3108</a><br></div></div></div>
</div>
</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>