Repository navigation
Conversation
There was a problem hiding this comment.
this import should be inside the function
|
This (pushed just now) is a major rewrite of the dotplot function. I think all the issues raised about the initial PR have now been addressed, or are no longer relevant. Thank you for the detailed review,. I redesigned the interface to make it more natural to use (no need to construct a complicated special data structure just to get the plot). These "dotplots" are also known as "forest plots". Perhaps that name is more well-known? I'm open to changing the name. The test_dotplot.py script isn't really a test script in the usual sense. I don't really know how to write nose-style tests for graphics. For myself, I need it to output a pdf because I work remotely over a terminal. Other relevant files: www.stat.lsa.umich.edu/~kshedden/test_dotplot.pdf www.stat.lsa.umich.edu/~kshedden/dotplot_gdp_example.py www.stat.lsa.umich.edu/~kshedden/wbdata.csv |
|
In a google search "forest plot" looks more informative than "dot plot", and closer to the pictures that it produces. |
|
Given the google results, this looks like it can be useful to plot the multiple comparison. |
…ified; reintroduced option for tests to output to pdf (but switched off).
|
I added two simple examples to the dotplot doc string. Two notebooks are here: The notebooks are also on the wiki examples page. On Fri, Apr 4, 2014 at 2:07 AM, Skipper Seabold [email protected]:
|
|
Thanks. How persistent should (can) we expect these data URLs to be for the examples? Would it be worth to include these datasets in the package? |
|
I don't plan to remove these files, but I do think that it would be better On Sat, Apr 5, 2014 at 10:11 PM, Skipper Seabold
|
There was a problem hiding this comment.
I don't think this is valid Python anymore with no exception. We (optionally) require matplotlib >= 1.2.1 now, so you don't need to check for less than v1.x.x.
|
I don't see anything in a quick browse. looks good to me. aside: I just opened a bug issue for tukeyhsd plot, it might be possible to use dot_plot for creating the plot. |
|
two items: I had to look for
|
|
We don't really have a convention yet. Sometimes |
|
In methods |
|
Sounds reasonable to me. |
|
I thought this was already merged. Is there anything left to do? I'd like to merge this, without reviewing all the matplotlib and plot option details. plots look good. |
|
Yes, it's ready to merge. I've been using it and it seems stable. I just On Wed, May 21, 2014 at 12:42 AM, Josef Perktold
|
|
Ok, I will rebase this to get it ready for merging. |
|
merged rebased version in PR #1681 |
(This is a repeat of a PR I made a few hours ago, moving to a new feature branch per Josef's request)
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.