成功解决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.0的API,

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中导入了。


相关文章
|
7月前
【已解决】TypeError: Cannot destructure property `createHash` of ‘undefined‘ or ‘null‘
【已解决】TypeError: Cannot destructure property `createHash` of ‘undefined‘ or ‘null‘
179 1
|
8月前
解决 TypeError: Cannot read property ‘tapPromise‘ of undefined
解决 TypeError: Cannot read property ‘tapPromise‘ of undefined
155 0
|
4月前
|
测试技术
ERROR [karma]_ TypeError_ Cannot read property 'unmask' of undefine
ERROR [karma]_ TypeError_ Cannot read property 'unmask' of undefine
|
8月前
|
JavaScript
成功解决:Uncaught TypeError: Cannot read property 'search' of undefined
成功解决:Uncaught TypeError: Cannot read property 'search' of undefined
|
9月前
|
数据库 OceanBase
RuntimeError: 'PluginContext' object has no attribute 'set_variable'
RuntimeError: 'PluginContext' object has no attribute 'set_variable'
83 2
|
11月前
AttributeError: ‘version_info‘ object has no attribute ‘version‘
AttributeError: ‘version_info‘ object has no attribute ‘version‘
198 0
成功解决AttributeError: ‘PathCollection‘ object has no property ‘n_levels‘
成功解决AttributeError: ‘PathCollection‘ object has no property ‘n_levels‘
|
计算机视觉
成功解决TypeError: __init__() got an unexpected keyword argument 'n_iterations'
成功解决TypeError: __init__() got an unexpected keyword argument 'n_iterations'
AttributeError: 'module' object has no attribute 'X509_up_ref'
AttributeError: 'module' object has no attribute 'X509_up_ref'
134 0
成功解决AttributeError: ‘JointGrid‘ object has no attribute ‘annotate‘
成功解决AttributeError: ‘JointGrid‘ object has no attribute ‘annotate‘