pydata/pandas — pull request #7780 by shoyer (2014-07-18 05:52:42+00:00)
Title: API: support `c` and `colormap` args for DataFrame.plot with kind='scatter'

`matplotlib.pyplot.scatter` supports the argument `c` for setting the color of
each point. This patch lets you easily set it by giving a column name (currently
you need to supply an ndarray to make it work, since pandas isn't aware of it):

df.plot('x', 'y', c='z', kind='scatter')

vs

df.plot('x', 'y', c=df['z'].values, kind='scatter')

While I was at it, I noticed that `kind='scatter'` did not support the `colormap`
argument that some of the other methods support (notably `kind='hexbin'`). So
I added it, too.

This change should be almost entirely backwards compatible, unless folks are naming
columns in their data frame valid matplotlib colors and using the same color name
for the `c` argument.

A colorbar will also be added automatically if relevant.