已解决AttributeError: Unknown property axisbg
解决 Property unknown AttributeError
2023-09-27 14:27:32 时间
已解决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中导入了。
PS
有问题评论区留言即可
相关文章
- PyQt5安装及ModuleNotFoundError: No module named 'PyQt5'问题解决
- FutureWarning: pandas.Int64Index is deprecated and will be removed ... in a future version. 解决方法
- 万万没想到,我在夜市地摊解决了MySQL临时表空间难题~~
- mybatis报错:A query was run and no Result Maps were found for the Mapped Statement、、Property [login_ip] not found on type [com.thinkgem.jeesite.common.permission.entity.PremissUser]问题解决
- Eclipse中propedit插件安装(解决property中文问题)
- 以后,可能找工作的面试,得靠打游戏解决了
- [Windows]解决:windows连接远程桌面-出现身份验证错误,要求的函数不受支持( CredSSP加密数据库修正)[转载]
- python解决处理中文的问题
- 成功解决:[object Object]
- Too many connections解决方法
- nginx [error] open() "/usr/local/nginx/logs/nginx.pid" failed的解决
- 解决Gradle DSL method not found: ‘android()’
- 解决sweetalert 无故报错 elem.className.replace Uncaught TypeError: Cannot read property 'className' of null
- 解决Visual C++ Redistributable安装找不到vc_runtimeMinimum_x86.msi最简单办法
- 安装homebrew报错error: Not a valid ref: refs/remotes/origin/master 的解决方法
- sqlloader parallel调用报ORA-26002: table has index defined upon it.解决方法
- 我的Android进阶之旅------>解决:debug-stripped.ap_' specified for property 'resourceFile' does not exist.
- C++ | 智能指针面试题:使用weak_ptr解决循环引用无法析构的问题