Histogram question

I am trying to plot a histogram of some values in an array:
eg:-
input_hist=[0.5,0.5,0.66,0.83,0.92,0.92,0.93,0.97,0.98,0.98,0.98,0.99]
after issuing the pylab.hist(input_hist) statement these are the return values that i get.

(array([2, 0, 0, 1, 0, 0, 1, 0, 3, 5]), array([ 0.5 , 0.549, 0.598, 0.647, 0.696, 0.745, 0.794, 0.843,
0.892, 0.941, 0.99 ]), <a list of 10 Patch objects>)

Can someone please explain these return values , i did not understand them through the hist documentation.

Thanks in advance

Aditya

The return value is a length three tuple with the following elements
(n, bins, patches)

  *n* - an array of counts in each bin in your histogram

  *bins* - an array edges of the bins that your data is binned into

  *patches* - a list of matplotlib rectangle instances (you can use
these to configure properties like facecolor, linewidth, etc...)

JDH

ยทยทยท

On Sat, Jul 26, 2008 at 3:47 PM, aditya shukla <adityashukla1983@...287...> wrote:

I am trying to plot a histogram of some values in an array:
eg:-
input_hist=[0.5,0.5,0.66,0.83,0.92,0.92,0.93,0.97,0.98,0.98,0.98,0.99]
after issuing the pylab.hist(input_hist) statement these are the return
values that i get.

(array([2, 0, 0, 1, 0, 0, 1, 0, 3, 5]), array([ 0.5 , 0.549, 0.598,
0.647, 0.696, 0.745, 0.794, 0.843,
        0.892, 0.941, 0.99 ]), <a list of 10 Patch objects>)

Can someone please explain these return values , i did not understand them
through the hist documentation.