首页 > 解决方案 > 出现在海滨条形图中的直线

问题描述

我的条形图的一条线上出现了一条线

这就是它的样子

下面是我的代码

sns.barplot(x='Police force sent NRM referral for Crime Recording', y='Total', data=dfForces1)
sns.despine()
plt. xticks(rotation=90)


import matplotlib.ticker as ticker

ax_data = sns.barplot(x= 'Police force sent NRM referral for Crime Recording', y = 'Total', data=dfForces1) # change as per how you are plotting, just for an example
ax_data.yaxis.set_major_locator(ticker.MultipleLocator(40)) # it would have a tick frequency of 40, change 40 to the tick-frequency you want.

ax_data.yaxis.set_major_formatter(ticker.ScalarFormatter())````

标签: bar-chartseaborn

解决方案


推荐阅读