美文网首页
seaborn的joinplot函数画图无法显示pearson相

seaborn的joinplot函数画图无法显示pearson相

作者: chenglansky | 来源:发表于2019-07-18 18:32 被阅读0次

    问题:做实验的时候发现别人代码画出的图有pearon系数的显示,我的却没有,这个是需要自己添加
    stat_func必不可少!
    解决办法:

    import scipy.stats as sci
    def pearson(x,y):
        r,p = stats.pearsonr(x,y)
    sns.jointplot('Comedy','Adventure',pivot,kind='reg',color='g',stat_func=sci.pearsonr)
    

    相关文章

      网友评论

          本文标题:seaborn的joinplot函数画图无法显示pearson相

          本文链接:https://www.haomeiwen.com/subject/jorrlctx.html