成功解决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中導入了。
?
?
?
相關文章推薦
AttributeError: Unknown property axisbg
?
總結
以上是生活随笔為你收集整理的成功解决AttributeError: Unknown property axisbg的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Py之mpld3:mpld3的简介、安装
- 下一篇: ML之Clustering之K-mean