您当前的位置: 首页 > 
  • 0浏览

    0关注

    2393博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

成功解决AttributeError: ‘JointGrid‘ object has no attribute ‘annotate‘

一个处女座的程序猿 发布时间:2021-01-25 21:45:32 ,浏览量:0

成功解决AttributeError: 'JointGrid' object has no attribute 'annotate'

 

 

 

目录

解决问题

解决思路

解决方法

 

 

 

解决问题
Traceback (most recent call last):
  File "F:\test2021011.py", line 60, in 
    JointGridScatterPlot(col_nums02,data_frame)
  File "F:\site-packages\DataVisualize_Functions2D.py", line 222, in JointGridScatterPlot
    fg.annotate(stats.pearsonr)
AttributeError: 'JointGrid' object has no attribute 'annotate'

 

 

 

解决思路

属性错误:'JointGrid'对象没有'annotate'属性

 

 

 

 

解决方法
    fg=sns.JointGrid(x=cols[0],y=cols[1],data=data_frame,)
    fg=fg.plot_joint(plt.scatter,color='m',edgecolor='white')             
    fg.annotate(stats.pearsonr)

JointGrid类中没有该方法,建议升级或者更新包的版本。

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

关注
打赏
1664196048
查看更多评论
立即登录/注册

微信扫码登录

0.0421s