statsmodels/statsmodels — pull request #558 by jseabold (2012-10-31 14:51:46+00:00)
Title: Plot cleanup

Cleans up regression diagnostic plots. One change is I dropped the _ax suffix and added _grid to the other methods. I think this is a little clearer especially if you aren't that familiar with all the matplotlib intricacies. They should work now on ndarray inputs, pandas inputs, and with a formula input and passing data if they are more exploratory and didn't accept a results instance to begin with.

I made two additional plots, influence_plot and plot_leverage_resid2.

I moved some of the code into convenience functions in utils for annotating plot points with their observation labels, for doing tight_layout, and for accepting either columns indexes or column names in functions. This stuff can be reused in plotting and the idx<->names probably throughout the code.

I added an extra dataset, statecrime. It's statewide crime statistics from the US Census in 2009. It's all public domain. Will be useful in showing outliers/leverage and eventually for robust estimation examples.

I added a notebook to the pull request that demonstrates the new changes completely.

http://nbviewer.ipython.org/urls/raw.github.com/gist/3987408/249fba5413b53e6e67f774ce80e7c060e3f53c94/example_regression_plots.ipynb