-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added bw_method to sm.graphics.violinplot + default colors? #1226
Conversation
Thanks Olga, The change looks good, I also think it should be a regular keyword argument, as you added it. I also agree about the color, I like your bluish much better. But maybe someone else also has an opinion, I'm not an "expert" on default color choices. |
Hi Olga, |
Great! I don't claim to be a color expert either, so I stick to the colors that experts have picked out such as colorbrewer: http://bl.ocks.org/mbostock/5577023 There's a colorbrewer extension for Python ( I also have a question about graphics in general. Many of the plots are ggplot2-like, is that because its' what people like in R? |
I would call our "style" so far eclectic, and not "ggplot2-like" The plots in statsmodels were written by different authors, mostly based on whatever they found as reference. We try to have a common pattern for the interface, but nobody has reviewed the statsmodels "style" yet. There are other packages, your prettyplotlib looks like that, that emphasis style and convenience over statistics, while so far our emphasis is reversed We use the |
Sorry for the slow review here. Can you add something to the documentation about
|
@@ -14,7 +14,7 @@ | |||
|
|||
|
|||
def violinplot(data, ax=None, labels=None, positions=None, side='both', | |||
show_boxplot=True, plot_opts={}): | |||
show_boxplot=True, bw_method=None, plot_opts={}): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think bw_method
should go after plot_opts
for backwards compatibility
Closing this. Please re-open if you find the time to address the comments. |
I started to work on this, but it needs more KDE option. |
Why does your work need this PR open? |
Because if there is no open issue or PR, then I forget about it. |
Then let's keep it in an issue. I'm trying to clean up the PRs. |
Closing PRs that are not obsolete and superseded by something else is not useful. I like a todo list and not a clean issue tracker. |
Hello there,
I have a homebrewed version of this (also based off of the same code!) but it allows the user to specify the bandwidth method. So in this PR, I added the ability to change the bandwidth method. It's currently with the regular args because I didn't think this is a plot argument, but rather an estimation argument. Suggestions?
Here are some examples: http://nbviewer.ipython.org/gist/olgabot/7915540
Besides the bandwidth method, can the default facecolor also be changed? The yellow is rather ugly, and I'd much prefer something from colorbrewer: http://bl.ocks.org/mbostock/5577023
Thanks,
Olga
PS Initially I was going to add this to
pandas
(pandas-dev/pandas#5676) but sincestatsmodels
already has most of the code, this seemed like a more natural choice.