我试图在分组条形图中逐日更改x轴刻度。我尝试了here和{a2}和here的解决方案,但没有一个有效。 我的代码显示绘图与每日滴答的工作是如下:
ax = data.groupby(['pos', data['date'].dt.strftime('')])['date'].count().unstack(0).plot.bar(title = 'TITLE', figsize=(14,8))
_ = ax.set_xlabel('day')
_ = ax.set_ylabel('count')
mylabels = ['R', 'L']
_ = ax.legend(labels=mylabels)
plt.show()
^{pr2}$
我是怎么做到的:
相关问题 更多 >
编程相关推荐