Skip to content
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

It would be awesome if box- and violinplot accept an alpha value #1080

Closed
habi opened this issue Dec 14, 2016 · 4 comments
Closed

It would be awesome if box- and violinplot accept an alpha value #1080

habi opened this issue Dec 14, 2016 · 4 comments

Comments

@habi
Copy link
Contributor

habi commented Dec 14, 2016

Sometimes I would like to make very subdued box- or violinplots.
It would be nice if they would accept an alpha-value as for example barplot does.

violinplot just does nothing with the parameter, while boxplot fails with a TypeError about the unexpected keyword argument 'alpha'.

clipboard01

@habi habi changed the title I would be awesome if box- and violinplot accept an alpha value It would be awesome if box- and violinplot accept an alpha value Dec 14, 2016
@habi
Copy link
Contributor Author

habi commented Dec 14, 2016

Sorry, forgot to mention:

  • seaborn version 0.7.1
  • matplotlib version 1.5.3
  • running in Jupypter under Python '3.5.2 |Anaconda 4.2.0 (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)]'

@mwaskom
Copy link
Owner

mwaskom commented Dec 14, 2016

It may be awesome, but there are enough complexities that it isn't going to happen; sorry. See also #979

@mwaskom mwaskom closed this as completed Dec 14, 2016
@habi
Copy link
Contributor Author

habi commented Dec 16, 2016

OK. I just found it strange that barplot accepts alpha and the other two don't. I'll use the workaround mentioned in the other issue, thanks.

@mwaskom
Copy link
Owner

mwaskom commented Dec 16, 2016

If you look at the function signature you'll see that alpha isn't a parameter of barplot. But barplot passes its kwargs to the underlying matplotlib function plt.bar. The underlying matplotlib function for boxplot doesn't do anything with an alpha parameter and there's no single underlying matplotlib function for violinplot, hence the behavior that you see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants