-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Barplot does not allow bar width to be set. #824
Comments
Do you have an example? In [26]: s = pd.Series([1, 2, 3])
In [27]: s.plot.bar(width=.1)
Out[27]: <matplotlib.axes._subplots.AxesSubplot at 0x1127b07f0>
In [28]: plt.figure()
Out[28]: <matplotlib.figure.Figure at 0x11a777390>
In [29]: s.plot.bar(width=.9)
Out[29]: <matplotlib.axes._subplots.AxesSubplot at 0x11a781128> |
tips = sns.load_dataset("tips")
ax = sns.barplot(x="day", y="total_bill", hue="sex", data=tips, width=.3) If I look inside then I can not find a way to alter the internal width parameter through |
It is intended. |
This becomes a larger problem, especially on larger plots when hue is chosen. Please see: It forces you to choose between having tiny boxes (or violins, etc) or generating your own color palette and then having to create a legend from scratch. |
Was @brevans issue ever looked at? I'm having this same issue as well on barplots. If you put in the |
Agreed with @alexpetralia, this does seem to be unintended behavior when specifying I know of the solution suggested in: http://stackoverflow.com/questions/36092363/seaborn-boxplots-changes-narrows-width-of-boxes-when-a-hue-is-chosen-how-migh I can submit a PR to clarify this behavior in the documentation if you'd like @mwaskom. |
The
width
argument can not be passed inbarplot
to specify the bar width. Since this is possible forboxplot
I assume this was not intended.The text was updated successfully, but these errors were encountered: