gpt4 book ai didi

python - 如何显示 Seaborn pairplot() 或 PridGrid() 图表的标题

转载 作者:行者123 更新时间:2023-11-28 19:54:34 25 4
gpt4 key购买 nike


import matplotlib.pyplot as plt
import seaborn as sns

sns.set_style('whitegrid')
%matplotlib inline

sns.pairplot(df.dropna())
plt.show()

我想知道如何显示这个情节的标题?非常感谢。

最佳答案

答案由 ivandov 提供为我工作,是的,我也遇到了额外间距的问题。一个人可以简单地使用:

g = sns.pairplot(df)
g.fig.suptitle("Your Title", y=1.08) # y= some height>1

实现额外的间距调整

关于python - 如何显示 Seaborn pairplot() 或 PridGrid() 图表的标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36813396/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com