【发布时间】:2021-06-28 17:21:46
【问题描述】:
所以我有一个带有日期时间索引的数据框。我删除了某些时期的行,但是当我绘制数据时,matplotlib 仍然显示删除的时期(例如:2021-03-21 到 2021-03-24)。
这是对这些时期的调用:
df['2021-03-21':'2021-03-23]
这是情节的代码:
dfStd = df.resample('d').std()
fig, ax = plt.subplots(figsize=(16,3))
bp = sns.barplot(x = dfStd.index.strftime('%d-%b'), y='Feed_tph', data=dfStd , color='darkorange', ax=ax)
ax.set_ylabel('Dry Feed [tph]')
ax.set_xlabel('')
plt.xticks(rotation = 90)
如何从图中删除这些句点?
【问题讨论】:
-
你能编辑问题和一些重现问题的代码吗?更容易提供帮助。
标签: python pandas dataframe matplotlib seaborn