bar-chart - 出现在海滨条形图中的直线
问题描述
我的条形图的一条线上出现了一条线
下面是我的代码
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())````
解决方案
推荐阅读
- flutter - Flutter FutureBuilder:“响应”类型不是“字符串”类型的子类型
- amazon-web-services - EC2 实例不应有公共 IP 地址 | AWS 基础安全最佳实践
- python - 在 Python 中更改函数中的全局列表时不需要声明“gobal”?
- google-apps-script - Google Sheets 脚本:搜索字符串的最快方法(不需要位置)
- c# - “这些列当前没有唯一值”,如何避免此异常?
- windows - chef ohai 没有获取任何操作系统属性
- janus-gateway - Janus RTC:在 WebRTC 中查看的 RTMP 广播
- excel - 如何在Excel中对一行中的值求和?
- javascript - 从特定的 ts 文件创建记录器文件
- python-3.x - 如何将 Pandas 数据框打印到保留 Pandas 列格式的 Kivy ScrollView 标签