python-and-Taiwan-stock-market icon indicating copy to clipboard operation
python-and-Taiwan-stock-market copied to clipboard

mpl_finance過時?

Open wst0310 opened this issue 4 years ago • 1 comments

每次執行K線圖, 皆會出現:

WARNING: mpl_finance is deprecated:

Please use `mplfinance` instead (no hyphen, no underscore).

To install: `pip install --upgrade mplfinance`

For more information, see: https://pypi.org/project/mplfinance/

=================================================================

__warnings.warn('\n\n ================================================================='+ 但改用mplfinance則會報錯, 無candlestick2_ochl方法。

wst0310 avatar Sep 26 '21 07:09 wst0310

Hi,原則上如果不影響功能與結果,通常我們會選擇無視Warning。 當然如果您真的很擔心,如您所說mpl_finance的維護者似乎將重心轉而放在mplfinance上。 而mplfinance沒有candlestick2_ochl()方法,據我所知是: mplfinance.plot(data,type='candle')

供參考,看各人選擇囉,我因為比較懶所以至今仍然在使用mpl_finance,使用多年了。當然使用官方重心維護的mplfinance也是一個很好的選擇。

arleigh418 avatar Sep 26 '21 08:09 arleigh418