# [Numpy-discussion] NumPy Histogram for Tentative NumPy Tutorial Questions

Wayne Watson sierra_mtnview@sbcglobal....
Thu Nov 26 23:20:05 CST 2009

```
josef.pktd@gmail.com wrote:
> On Thu, Nov 26, 2009 at 9:48 PM,  <josef.pktd@gmail.com> wrote:
>
>> On Thu, Nov 26, 2009 at 8:18 PM, Wayne Watson
>> <sierra_mtnview@sbcglobal.net> wrote:
>>
>>> Yes, I'm just beginning to deal with the contents of NumPy, SciLab, and
>>> SciPy. They all have seemed part of one another, but I think I see how
>>> they've divided up the game. NumPy has no graphics. PyLab has them,
>>> basically under matplotlib. histogram seems a bit odd to me.  Here's
>>> what I mean. I chopped some lines out of the other program:
>>> import numpy
>>> import pylab
>>> #v = [5,5,2,2,2,6,4,4,3,3]
>>> v=[1,2,3,4]
>>> # Plot a normalized histogram
>>> pylab.hist(v, bins=8, normed=1)
>>> pylab.show()
>>>
>>> If it's run, I would have expected 4 bars separated by the same
>>> distance. The commented version of v is worse. It gives bar heights that
>>> are of an even height. Using more bins gives some odd length bars. Maybe
>>> an x row would help.
>>>
>>> While I'm at it what's with the two arrows at the bottom and the cross?
>>> I see the cross moves the drawing area, but does anyone really want to
>>> do that? The arrows seem to only move the drawing area slightly. Zoom,
>>> pencil,  seems pretty offbeat.
>>>
>> Do you mean this http://matplotlib.sourceforge.net/users/navigation_toolbar.html
>>
>> Zoom is convenient when you have for example a thousand points with
>> lots of variation in one graph.
>> Browsing some examples in the matplotlib docs might be useful to get a
>> basic idea of it
>> e.g http://matplotlib.sourceforge.net/gallery.html
>>
>> The main docs for numpy scipy start here http://docs.scipy.org/doc/
>>
>
> http://docs.scipy.org/doc/
>
> I guess a linebreak got wrongly interpreted
>
> Josef
>