matplotlib/matplotlib — pull request #2241 by neggert (2013-07-22 22:11:12+00:00)
Title: Add points histtype and errorbar argument to hist

This is the start of an attempt to address #1815. There are a couple changes to the `hist` function

1. I've added a new `points` histtype. I don't expect that this will get much use by itself. It's mostly there so that the points can have error bars put on them.
2. I've added a new kwarg to hist called `errorbars`. Currently, it accepts only `False` or 'gaussian'. I envision eventually adding a 'poisson' option, as discussed in #1815.

Another thing I'd still like to do is to make the `errorbars` kwarg work with the bar and step histtypes. I'd envision putting the error bars on those plots using a hash, as is done in [this plot](https://twiki.cern.ch/twiki/pub/CMSPublic/PhysicsResultsSUS13006/data_mc_3l_linear.pdf).

I'd also like a few thoughts on my implementation. One of the problems I ran into is that the step and bar histtypes return PatchCollections, but if we make these point histograms using `scatter` or `errorbars`, those return a PathCollection and a list of Lines and LineCollections, respectively. This means that the code that is used to apply the styling kwargs doesn't work in this case.

For now, I've worked around this by just passing the kwargs dict directly to the plotting functions and not using the patch property updating code. Does this seem like a reasonable approach?