【发布时间】:2016-03-19 01:42:12
【问题描述】:
当我绘制以下名为 df 的 DataFrame 时,我得到了这个数字。
df = pd.DataFrame([[1 for _ in range(20)]]).T
df.index = ["{}:00:00".format(x) for x in range(20)]
df.plot()
我想每隔两三行显示xticks,即0:00、2:00、4:00,...因为每5个间隔看起来太大了。
是否可以按指定的时间间隔显示 xticks?
【问题讨论】:
标签: python pandas matplotlib