成功解决AttributeError: Unknown property axisbg
成功解決AttributeError: Unknown property axisbg
?
?
目錄
解決問題
解決思路
解決方法
?
?
?
解決問題
? ? raise AttributeError('Unknown property %s' % k)
AttributeError: Unknown property axisbg
?
?
?
解決思路
引發(fā)屬性錯(cuò)誤(“未知屬性%s”%k)
屬性錯(cuò)誤:未知屬性axisbg
?
?
?
?
解決方法
在matplotlib.pyplot.subplot2grid()的屬性欄里面已經(jīng)沒有了axisbg這個(gè)參數(shù),根據(jù)matplotlib 2.2.0的API,
Color of Axes
The axisbg and axis_bgcolor properties on Axes have been deprecated in favor of facecolor.
得知,曾經(jīng)包含的屬性axisbg已經(jīng)被facecolor所替換:
ax = plt.subplot2grid((2,1), (1,0), rowspan=4, colspan=4, facecolor=’#07000d’)
? ? 同樣的,matplotlib里面也去掉了 finance包,現(xiàn)在有個(gè)獨(dú)立的庫 mpl_finance,如果想用原來finance庫中的函數(shù),比如 candlestick_ochl,就需要從mpl_finance中導(dǎo)入了。
?
?
?
相關(guān)文章推薦
AttributeError: Unknown property axisbg
?
總結(jié)
以上是生活随笔為你收集整理的成功解决AttributeError: Unknown property axisbg的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Py之mpld3:mpld3的简介、安装
- 下一篇: 成功解决TypeError: Objec