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

标签 python matplotlib seaborn


    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/

相关文章:

python - 按变量分组、排序和打印来自另一列的值

python 2.6.4 不支持 mod_python?

python - 如何按照字典中出现的顺序获取字典中的键?

python matplotlib : how to automatically save figures in . 图格式?

python - 对带区使用 fill_ Between

python - 使用 Pandas 和 Scatter_Matrix 将不会显示

python - Seaborn TypeError : Cannot cast array data from dtype ('int64' ) to dtype ('int32' ) according to the rule 'safe'

python - 如何使 seaborn.heatmap 变大(正常大小)?

python - 如何在每个循环中更改图形的 xlabel

python - 运行时错误 : working outside of request context When request used in first line of method