问题描述
运行下面代码时出现报错 'ArtistList' object has no attribute 'append'
im1 = NonUniformImage(ax1, interpolation='bilinear', extent=extent_cross)
im1.set_data(t1, cross_period, cross_power)
ax1.images.append(im1)
原因分析:
推测是matplotlib版本太新了,因为升级版本后多次遇到类似的报错,简单解决方法就是重新安装旧版本,但是因为正在使用的库不支持旧版本的matplotlib,所以还是去官网找了一下,发现第三行append这里改成下面这样就可以了。
ax1.add_image(im1)