航海条中出现的直线

时间:2019-04-03 20:16:23

标签: bar-chart seaborn

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

this is what it looks like

和下面的代码

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())````

0 个答案:

没有答案