Python中的axisbg的属性错误 [英] Attribute error for axisbg in Python

查看:1017
本文介绍了Python中的axisbg的属性错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在python中得到属性错误:未知属性axisbg,请给我一个解决此问题的建议?



我尝试过的方法:



这是我的代码



>>> import matplotlib



>>>导入matplotlib.pyplot作为命中



>>> kit = hit.figure()



>>> pot = kit.patch



>>> pot.set_facecolor('green')



>>> x = [3,12,20,24,29]



>>> y = [5,9,15,19,23]



>>> bit = kit.add_subplot(1,1,1,axisbg ='red')

解决方案

axisbg被替换

try facecolor =红色的

Got "Attribute Error: Unknown property axisbg" in python, Please give me a suggestion to solve this?

What I have tried:

here is my code

>>> import matplotlib

>>> import matplotlib.pyplot as hit

>>> kit = hit.figure()

>>> pot = kit.patch

>>> pot.set_facecolor('green')

>>> x = [3,12,20,24,29]

>>> y = [5,9,15,19,23]

>>> bit = kit.add_subplot(1,1,1,axisbg='red')

解决方案

axisbg be replace
try facecolor = "red"


这篇关于Python中的axisbg的属性错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆