使用matplotlib画图时用以下代码报错如下:AttributeError: Unknown property axisbg

使用plt.subplot()画图时报错:AttributeError: Unknown property axisbg

原代码如下:

plt.subplot(221+i, axisbg=color)

matplotlib2.2中将axisbg替换为facecolor在程序中使用facecolor即可如下:

plt.subplot(221+i, facecolor=color)

猜你喜欢

转载自blog.csdn.net/weixin_42074867/article/details/88551001