Turn off error bars in Seaborn Bar Plot

2019-04-23 23:52发布

问题:

I'm using GridSpec in matplotlib to create a page that has 9 subplots. One of the subplots is a Seaborn bar plot created with the following code:

import seaborn as sns
sns.barplot(x=df['Time'], y=df['Volume_Count'], ax=ax7)

Is there a way to turn off the vertical error bars of the bar plot? If not, is it possible to reduce the horizontal width of the bars?

Thanks!

回答1:

Have you tried the ci argument? According to the documentation:

ci : float or None, optional Size of confidence intervals to draw around estimated values. If None, no bootstrapping will be performed, and error bars will not be drawn.

sns.barplot(x=df['Time'], y=df['Volume_Count'], ax=ax7, ci=None)