python-3.x - Seaborn 子图 x 轴未正确显示
问题描述
我使用 seaborn 创建了子图,但我的 x 轴显示不正确。岁月不顺?为什么是这样?
这是我的代码和输出:
g=sns.relplot(x="Year", y="Indicator_Value",
data=Emissions_R_df,
kind="line",
style="Indicator_Name",
hue="Indicator_Name",
row="Country_Name"
)
g.fig.suptitle("Amount of Emissions from CO2, CH4, N20, and others - 1960-2014", y=1.05)
g.set(xlabel="Years",
ylabel="Emissions, kiloton(kt)")
g.fig.set_size_inches(15,20)
plt.gca().xaxis.set_major_locator(MaxNLocator(steps=[10]))
plt.show()
解决方案
推荐阅读
- kotlin - 等价于 if(root == null) return root; 在科特林
- python - 循环遍历子小部件并将小部件值(条目和复选按钮)存储在列表中
- python - Whatsapp 使用 Python 聊天分析器,下一步是什么?
- awk - 删除换行符,同时保持换行符后跟另一个换行符
- vba - 导出 PowerPoint 幻灯片
- linux - 在linux中为.net Core(Docker)编写txt文件
- sql-server - 我怎样才能有 CTE 的身份列
- python - 当试图用日期对浮点数绘制时间序列数据时,我在 xaxis 中收到数字而不是日期
- mysql - 在标记上拆分字符串并在拆分词上聚合
- unity3d - 为什么 Unity Android 游戏中的精灵模糊?