matplotlib/matplotlib — pull request #813 by piti118 (2012-04-03 21:44:02+00:00)
Title: make hist return value for 'step' and 'bar' consistent with each other

'step' now return Poly or list of Poly of list of Poly and list of list of Poly for single and multiple hist request. And it's more consistent with what is written in the documentation of hist:

>Compute and draw the histogram of x. The return value is a tuple (n, bins, patches) or ([n0, n1, ...], bins, [patches0, patches1,...]) if the input contains multiple data

This gives a trouble when people are trying to create legend ex:

```python
from matplotlib import pyplot as P
import numpy as np
arrs = []
arrs.append( np.random.randn(100) )
arrs.append( np.random.randn(100) )
n, bins, patches = P.hist( arrs, 10, histtype='step')
print patches
print patches[0]
P.title('test legend')
P.legend(patches, ('a','b') )
```

This doesn't work while

```python
from matplotlib import pyplot as P
import numpy as np
arrs = []
arrs.append( np.random.randn(100) )
arrs.append( np.random.randn(100) )
n, bins, patches = P.hist( arrs, 10, histtype='bar')
print patches
print patches[0]
P.title('test legend')
P.legend(patches, ('a','b') )
```

works