成功解决AttributeError: Unknown property axisbg

简介: 成功解决AttributeError: Unknown property axisbg

解决问题

 

  raise AttributeError('Unknown property %s' % k)

AttributeError: Unknown property axisbg

 

 

解决思路

 

引发属性错误(未知属性%s”%k

属性错误:未知属性axisbg

 

 

 

解决方法

 

matplotlib.pyplot.subplot2grid()的属性栏里面已经没有了axisbg这个参数,根据matplotlib 2.2.0API

Color of Axes

The axisbg and axis_bgcolor properties on Axes have been deprecated in favor of facecolor.

 

得知,曾经包含的属性axisbg已经被facecolor所替换:

ax = plt.subplot2grid((2,1), (1,0), rowspan=4, colspan=4, facecolor=’#07000d’)

  同样的,matplotlib里面也去掉了finance包,现在有个独立的库mpl_finance,如果想用原来finance库中的函数,比如candlestick_ochl,就需要从mpl_finance中导入了。

相关文章
【已解决】TypeError: Cannot destructure property `createHash` of ‘undefined‘ or ‘null‘
【已解决】TypeError: Cannot destructure property `createHash` of ‘undefined‘ or ‘null‘
323 1
|
8天前
|
Java 数据库
JPA IllegalArgumentException occurred while calling setter for property问题件解决
JPA IllegalArgumentException occurred while calling setter for property问题件解决
|
5月前
|
安全 计算机视觉 Python
【已解决】attributeerror: ‘FreeTypeFont‘ object has no attribute ‘getsize‘
【已解决】attributeerror: ‘FreeTypeFont‘ object has no attribute ‘getsize‘
|
5月前
|
iOS开发 MacOS
TypeError: Cannot read property ‘shop‘ of undefined
TypeError: Cannot read property ‘shop‘ of undefined
34 0
解决 TypeError: Cannot read property ‘tapPromise‘ of undefined
解决 TypeError: Cannot read property ‘tapPromise‘ of undefined
388 0
|
12月前
|
JavaScript CDN
Uncaught TypeError: Cannot redefine property: $router
Uncaught TypeError: Cannot redefine property: $router
138 0
|
自然语言处理 JavaScript
Uncaught TypeError: Cannot read property of undefined
vue中出现这种错误导致这种错误产生的原因是在选项 property 或回调上使用箭头函数 created: () => console.log(this.a) 或 vm.$watch('a', newValue => this.myMethod()) 1 2 因为箭头函数并没有 this,this 会作为变量一直向上级词法作用域查找,直至找到为止
112 0
|
JavaScript
成功解决:Uncaught TypeError: Cannot read property 'search' of undefined
成功解决:Uncaught TypeError: Cannot read property 'search' of undefined
成功解决AttributeError: ‘PathCollection‘ object has no property ‘n_levels‘
成功解决AttributeError: ‘PathCollection‘ object has no property ‘n_levels‘
错误代码: 1364 Field ‘password‘ doesn‘t have a default value
错误代码: 1364 Field ‘password‘ doesn‘t have a default value