<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Barry,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Those numbers at the top are coming from this line, which sets the main title for your plot:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default">  res@tiMainString = str_join(&quot;&quot;+x,&quot;,&quot;)</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Remove or comment this line.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">In what way do you want to combine the two graphs?  Do you want the bars side-by-side, or stacked?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">As an example, visit this page:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Applications/bar.shtml">http://www.ncl.ucar.edu/Applications/bar.shtml</a><br></div><div class="gmail_default"><br></div><div class="gmail_default">and look at:</div><div class="gmail_default"><br></div><div class="gmail_default">unique_5.ncl</div><div class="gmail_default">bar_10.ncl</div><div class="gmail_default">bar_15.ncl</div><div class="gmail_default"><br></div><div class="gmail_default">etc</div><div class="gmail_default"><br></div><div class="gmail_default">You can also look at the histogram page, see histo_6.ncl:</div><div class="gmail_default"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Applications/histo.shtml#ex6">http://www.ncl.ucar.edu/Applications/histo.shtml#ex6</a><br></div><div class="gmail_default"><br></div><div class="gmail_default">--Mary</div><div class="gmail_default"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 25, 2017 at 9:46 AM, Barry Lynn <span dir="ltr">&lt;<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@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"><div dir="ltr">Hi:<div><br></div><div>I followed Mary&#39;s comments to imply that the histogram function plots the number of elements within each interval.  Hence, when my obs distribution show, for example 227, I created 227 consecutive elements with the value 0, and then proceeded through the distribution.</div><div><br></div><div>I would like to do the following:</div><div><br></div><div>1) remove the list of numbers at the top of each graph,</div><div><br></div><div>2) Combine the graphs.</div><div><br></div><div>The typical approach doesn&#39;t work (bottom of code) because there are different numbers of x and y.</div><span class=""><div><br></div><div>Thank you for your suggestions.</div><div><br></div><div>Barry</div></span><div>P.S. The code runs stand alone.</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 25, 2017 at 12:34 AM, Mary Haley <span dir="ltr">&lt;<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>&gt;</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"><br></div><div class="gmail_default" style="font-size:small">The gsn_histogram function takes whatever &quot;bin&quot; values you give it, and counts the number of values that fall in each bin, and then draws this as a bar.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If you don&#39;t provide any bins, then gsn_histogram will pick &quot;nice&quot; bins for you.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The binning happens such that no values are binned in more than one interval.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Try running the attached script.  </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">In the first plot, I let gsn_histogram pick the bin intervals.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The first bin, which is from 1 to 2, will capture all values &gt;= 1 and &lt; 2, the second bin counts all values &gt;=2 and &lt; 3 and so on.  The very last bin, 9 to 10, will count all values &gt;= 9 and &lt;= 10.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The second plot I specifically set the bin intervals that I want.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">In the third plot, instead of counting values that fall in a range, I set an array of discrete values to explicitly count.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Hope this helps clear things up.</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"><div><div class="m_86495873125316461h5">On Sun, Apr 23, 2017 at 2:23 AM, Barry Lynn <span dir="ltr">&lt;<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@gmail.com</a>&gt;</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="m_86495873125316461h5"><div dir="ltr">Hi:<div><br></div><div>I have data specified as below.</div><div><br></div><div>I adapted code from this page:</div><div><br></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>Example # 6.</div><div><br></div><div>I set x = &quot;Obs&quot; and y = &quot;Forecast&quot; below.</div><div><br></div><div>The plot I get spreads the obs and forecast data on the x axis (where the x axis conforms to the value of each).</div><div><br></div><div>The y axis is labeled &quot;Frequency.&quot;</div><div><br></div><div>However, this is not a histogram/bar graph I am familiar with.  I am not sure how frequency is calculated (perhaps out of the total). In any case, I want to plot the x axis as intervals of 0 to 100 (by 10).  I want the y-axis to show the values in the obs/forecasts that conform to these intervals.  (Kaleidagraph can do this easily, but that&#39;s not the point (obviously)).</div><div><br></div><div>I see no such example of how to do this  -- even though this is often how bar graphs are presented.</div><div><br></div><div>Thank you for your suggestions.</div><div><br></div><div>Barry</div><div><br></div><div><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">  z = new((/2,dimsizes(x)/),integer)
  z(0,:) = x
  z(1,:) = y</pre><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap"><p class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail-p1"><span class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail-s1">Percent, Obs, Forecast</span></p>
<p class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail-p1"><span class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail-s1">    0    0.0,    0.0,</span></p>
<p class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail-p1"><span class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail-s1">    1  227.0,  212.2,</span></p>
<p class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail-p1"><span class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail-s1">    4  375.0,  176.7,</span></p>
<p class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail-p1"><span class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail-s1">    8  201.0,  141.1,</span></p>
<p class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail-p1"><span class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail-s1">   12   62.0,  143.2,</span></p>
<p class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail-p1"><span class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail-s1">   18   26.0,  327.5,</span></p>
<p class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail-p1"><span class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail-s1">   24    6.0,  199.5,</span></p>
<p class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail-p1"><span class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail-s1">   30    1.0,   50.2,</span></p>
<p class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail-p1"><span class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail-s1">   36    2.0,    9.4,</span></p>
<p class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail-p1"><span class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail-s1">  100    0.0,    4.0,</span></p>


</pre></div><div><br></div><div><br></div><div><br clear="all"><div><br></div>-- <br><div class="m_86495873125316461m_-4050567108541330383m_2869134393032695916gmail_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="m_86495873125316461gmail_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></blockquote></div><br></div>