Feature request: additional arguments of hist()

I am sorry that my last explanation was insufficient. The

    > point is that I think it is inefficient to execute the
    > following two lines in matplotlib.mlab.hist when I know the
    > result of "n" already.

Good point ...

    > Another point is hist() does not support error bar plot (but
    > bar() called from hist() does support.)

Another good point....

    > So, I propose again def hist(x, bins=10, noplot=0, normed=0,
    > weights=None, errors=None , **kwargs): in matplotlib.matplab.
    > I think if matplotlib supports this by default, it is very
    > smart and usefull to many users when making histogram plots
    > with matplotlib than letting hist() be mainly for the purpose
    > of "calculating" histograms.

OK, I'll give it some thought. Sounds reasonable enough. It doesn't
break backwards compatibility, adds useful features, and is more
consistent with bar.

JDH

Hi,

OK, I'll give it some thought. Sounds reasonable enough. It doesn't
break backwards compatibility, adds useful features, and is more
consistent with bar.

Thank you so much!

If possible, I think it is nice for matplotlib to be able to plot histograms by not only bars but also lines.
My meaning of "bar histogram plotting" is like the bottom-left plot in http://jas.freehep.org/images/screenshots/gui2.gif and "line histogram plotting" is like the others.
There are two reasons.
(1) Because one bin width becomes a few pixcels, it is hard to see when the number of bins is about a few thousand in the bar histogram plotting mode.
(2) The color of all of the data filled area become the same by using bar and one can specify the line color separately. This brings smart view when multiple histograms are plotted like in http://root.cern.ch/root/html/examples/gif/hsum.gif

Off course, the bar histogram plotting is more smart in one case, but in another case the line is better.
In addition, the support of both bar and line histogram plotting will matplotlib to be able to have more plotting features that the colors of line and filled area can be specified separately by the user.

It seems that it is relatively not difficult to implement the feature by connecting points of [(x0, 0), (x0, y0), (x1, y0), (x1, y1), (x2, y1), (x2, y2), ...(and so on)] and will also not break backwards compatibility.

If possible, please give a consideration to this.

···

On 2003.12.15, at 23:09 Japan, John Hunter wrote:

    > I am sorry that my last explanation was insufficient. The
    > point is that I think it is inefficient to execute the
    > following two lines in matplotlib.mlab.hist when I know the
    > result of "n" already.

Good point ...

    > Another point is hist() does not support error bar plot (but
    > bar() called from hist() does support.)

Another good point....

    > So, I propose again def hist(x, bins=10, noplot=0, normed=0,
    > weights=None, errors=None , **kwargs): in matplotlib.matplab.
    > I think if matplotlib supports this by default, it is very
    > smart and usefull to many users when making histogram plots
    > with matplotlib than letting hist() be mainly for the purpose
    > of "calculating" histograms.

OK, I'll give it some thought. Sounds reasonable enough. It doesn't
break backwards compatibility, adds useful features, and is more
consistent with bar.

JDH