我正在尝试更改seaborn.dislot中图形标题的字体大小
我有以下代码:
f = sns.displot(df,x="yearOfRegistration", kde=True, binwidth=5)
f.set(title = "Distribuição de Veículos com base no Ano de Registro")
f.set_axis_labels("Ano de Registro","Densidade (KDE)")
plt.show()
我的输出是:
所以,我试过这个:
f = sns.displot(df,x="yearOfRegistration", kde=True, binwidth=5)
f.set(title = "Distribuição de Veículos com base no Ano de Registro", font_size = 20)
f.set_axis_labels("Ano de Registro","Densidade (KDE)")
plt.show()
我有
"AttributeError: 'AxesSubplot' object has no property 'font_size'"
我查阅了所有seaborn文档,但找不到解决方案
有人能帮我吗? 谢谢
尝试使用
pyplot
:相关问题 更多 >
编程相关推荐