From: C M <cmpython@gm...>  20110904 03:58:56

On Sat, Sep 3, 2011 at 7:32 PM, mdekauwe <mdekauwe@...> wrote: > > So you do want a histogram then? I assume you have all of this sorted then, > the histogram function is very good. I don't think he's describing a histogram, because he is not plotting frequency of observations on the y axis, but data values (means of each bin). I think what surfcast23 wants is just a bar graph. So, surfcast23, I'd suggest you break it down into your two steps. First, how will you average your values by bin? You can probably figure that out by writing it out on paper in pseudocode and then just putting it in Python. Then you'll have a list of means, and you will pass that to the bar function in matplotlib, something like: from pylab import * ax = subplot(111) x = arange(4) your_list_of_means = [4,5,7,11] #computed earlier bar(x, your_list_of_means) xticks( x + 0.5, ('Bin1', 'Bin2', 'Bin3', 'Bin4') ) show() Che 