![](/img/trans.png)
[英]Matplotlib don't show all ticks/labels with bar chart. It skips first of y axis and last one of x axis
[英]Matplotlib don't show all ticks/labels with bar chart?
绘制具有许多点的线时,matplotlib 会自动隐藏一些 x 轴刻度/标签,以确保所有标签都适合。
如果我想 plot 一个酒吧聊天有很多点,有没有办法让 matplotlib 认为 x 轴与 plot 相同? 现在它正试图挤进所有的标签。
我建议指定 xtick 标签列表:
plt.xticks([80,150,300]) ### In this case these are numbers, change them to your values
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.