Trying to set the width of the bars on a horizontal bar plot with Seaborn
but am getting the following error:
TypeError: barh() got multiple values for argument 'width'
This is the code:
top_10_pop = df.sort_values(by="Residents").tail(10)
sns.barplot(data=top_10_pop, x="Residents", y="Commune", width=1)
plt.show()
Other answers state that this is an issue with the position of the parameters, but I tried to change it, use height
instead because this is an horizontal plot, nothing works. Without the width
parameter, I see the chart with no issues.
How to set the width of the bars in this case?
EDIT
I am use version 0.11.2
and trying the exact example on Seaborn website fails with same error. Maybe some compatibility issue with this version and/or my matplotlib version...