From: Jae-Joon L. <lee...@gm...> - 2010-01-08 18:23:12
|
On Wed, Jan 6, 2010 at 5:50 AM, Gergely Ungvary <ger...@co...> wrote: > I guess I'm not > the only one plotting statistical data with manually specified bins. Yes, and mpl works fine with manually specified bins. On the other hand, I don't see why you want to change the widths of the bar. As far as I can see, that is not the correct representation of the data. Anyhow, here is a little example that makes your bars in equal width. I never used "fixed width" bar so I'm not sure if this is what you want. -JJ aa = np.random.rand(100) bins = np.array([0., 0.2, 0.3, 0.8, 1.]) p = hist(aa, bins) rects = p[2] for r in rects: r.set_width(0.1) |