pydata/pandas — pull request #1716 by theJohnnyBrown (2012-08-01 07:26:04+00:00)
Title: Fixes bug in tools.scatter_plot

```
In [1]: import pandas

In [2]: from pandas.tools.plotting import scatter_plot

In [7]: df = pandas.DataFrame(np.random.randn(5,2), columns=['a','b'])

In [8]: df
Out[8]:
a b
0 0.032454 0.057020
1 -0.292223 -0.265303
2 -0.118943 1.315302
3 -2.754867 0.827289
4 0.497206 -1.360892

In [9]: df['c'] = [True, True, False, True, False]

In [10]: df
Out[10]:
a b c
0 0.032454 0.057020 True
1 -0.292223 -0.265303 True
2 -0.118943 1.315302 False
3 -2.754867 0.827289 True
4 0.497206 -1.360892 False

In [11]: scatter_plot(df, "a", "b", by="c")
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/Users/johnnybrown/Desktop/src/pandas/pandas/ in ()
----> 1 scatter_plot(df, "a", "b", by="c")

/Users/johnnybrown/Desktop/src/pandas/pandas/tools/plotting.py in scatter_plot(data, x, y, by, ax, figsize, grid)
1419
1420 if by is not None:
-> 1421 fig = _grouped_plot(plot_group, data, by=by, figsize=figsize, ax=ax)
1422 else:
1423 if ax is None:

/Users/johnnybrown/Desktop/src/pandas/pandas/tools/plotting.py in _grouped_plot(plotf, data, column, by, numeric_only, figsize, sharex, sharey, layout, rot, ax)
1634 ravel_axes = []
1635 for row in axes:
-> 1636 ravel_axes.extend(row)
1637
1638 for i, (key, group) in enumerate(grouped):

TypeError: 'AxesSubplot' object is not iterable

```