2010/3/26 timothee cezard <tcez...@staffmail.ed.ac.uk>: > does it make sense to use something like > plt.bar(bins, nb_per_bin, width=(max(bins)-min(bins)) / (1.5*len(bins)))
I think that should work, although you should use (max(bins) - min(bins) / 1.5 / (len(bins) - 1), but I would suggest: bounds = {some N + 1 array} center = 0.5 * (bounds[1:] + bounds[:-1]) width = 0.9 * (bounds[1:] - bounds[:-1]) offset = 0.5 * width plt.bar(center - offset, {some N array}, width = width) but I haven't tested it. bar() does accept an iterable as *width* argument. Friedrich ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users