【发布时间】:2020-08-12 10:27:50
【问题描述】:
我正在学习 Seaborn,并试图弄清楚如何为一年中的日期格式化 X 轴,以便它可读。假设我们有一个数据框,其中包含全年每一天的天气测量数据(365 行)。
sns.scatterplot(x = df_weather["DATE"], y = df_weather["MAX_TEMPERATURE_C"], color = 'red')
sns.scatterplot(x = df_weather["DATE"], y = df_weather["MIN_TEMPERATURE_C"], color = 'blue')
plt.show()
如何确保 X 轴标签可读?理想情况下,每月一个标签就可以了。
谢谢!
【问题讨论】:
标签: python time-series seaborn