Skip to content

Dotplot - #1293

Closed
kshedden wants to merge 50 commits into
statsmodels:masterfrom
kshedden:dotplot
Closed

Dotplot#1293
kshedden wants to merge 50 commits into
statsmodels:masterfrom
kshedden:dotplot

Conversation

@kshedden

@kshedden kshedden commented Jan 6, 2014

Copy link
Copy Markdown
Contributor

This is a basic dotplot function that I think might be a useful addition to statsmodels/graphics.

The term "dotplot" has been used in various ways, these are dotplots in the style of Bill Cleveland's book, similar to what is implemented in this R package:

http://stat.ethz.ch/R-manual/R-patched/library/graphics/html/dotchart.html

Additional examples can be found in the appendix of this manuscript:

http://polisci.msu.edu/jacoby/research/dotplots/tpm/Jacoby,%20Dotplots,%20TPM%20Draft.pdf

The test_dotplot file (in statsmodels/graphics/tests) shows how it works with simulated data. These are the plots generated by the test file:

http://dept.stat.lsa.umich.edu/~kshedden/test_dotplot.pdf

Some examples with real data are here:

http://dept.stat.lsa.umich.edu/~kshedden/dotplot_gdp_example.pdf
http://dept.stat.lsa.umich.edu/~kshedden/dotplot_gas_prices.pdf

Scripts:

http://dept.stat.lsa.umich.edu/~kshedden/dotplot_gdp_example.py
http://dept.stat.lsa.umich.edu/~kshedden/dotplot_gas_prices.py

Comments and suggestions are welcome.

@josef-pkt

Copy link
Copy Markdown
Member

plots look very nice

(after a brief look)
There are a few adjustments needed to follow more our pattern for the interface, matplotlib is optional and imports need to be try protected (there is a helper function). Also we use ax=None as default and return the fig.
For the rest I will work my way through it in the next few days.
But maybe some graphics experts can make a more qualified review.

In terms of PR only the last commit is relevant, everything else (GEE) is already in master. Your master branch https://github.com/kshedden/statsmodels/commits/master is still a GEE branch.

To follow the usual development pattern with git, I would recommend that you delete your master branch and create a new "master" branch as a copy of statsmodels master. Then it will be easier to base new feature branches on the statsmodels master and PR's will be easier to merge.

The GEE merge was based on a rebased version of your master branch, so everything there should me already in statsmodels master.

@josef-pkt

Copy link
Copy Markdown
Member

superseded by #1294

@josef-pkt josef-pkt closed this Jan 6, 2014
@kshedden kshedden mentioned this pull request Apr 8, 2014
@josef-pkt josef-pkt added the PR label Apr 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants