pydata/pandas — pull request #3473 by zachcp (2013-04-27 21:06:11+00:00)
Title: Scatterplot Method added

This is a simple pull request that creates a shortcut for scatter plots from a df. This is in reference to #2215 (and #1527) and follows the same pattern as df.hist().

#where you would previously have had to do:
from pandas.tools.plotting import scatter_plot
scatter_plot(df, x = "x", y = 'y')

#you can now do
df.scatter(x="x",y="y")

#example
import pandas as pd
import numpy as np
df = pd.DataFrame( np.random.randn(100,4))
df.scatter(x=1,y=2)

I followed the same pattern as df.hist() even though it looks like you are intended make a class object for scatterplots that can be passed to the plot_frame() function as is the case for BarPlot and LinePlot. In any case, this works and may be useful.

best,
zach cp