## Re: [Matplotlib-users] Histogram question

 Re: [Matplotlib-users] Histogram question From: John Hunter - 2008-07-26 21:21:29 ```On Sat, Jul 26, 2008 at 3:47 PM, aditya shukla 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 ]), ) > > Can someone please explain these return values , i did not understand them > through the hist documentation. 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 ```

 [Matplotlib-users] Histogram question From: aditya shukla - 2008-07-26 20:47:27 Attachments: Message as HTML ```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 ]), ) Can someone please explain these return values , i did not understand them through the hist documentation. Thanks in advance Aditya ```
 Re: [Matplotlib-users] Histogram question From: John Hunter - 2008-07-26 21:21:29 ```On Sat, Jul 26, 2008 at 3:47 PM, aditya shukla 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 ]), ) > > Can someone please explain these return values , i did not understand them > through the hist documentation. 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 ```