[英]How do I generate a candlestick chart from Morningstar data using matplotlib and mpl_finance?
[英]How to fix mpl_finance package for MatPlotLib?
收到此错误消息:
MatplotlibDeprecationWarning: The finance module has been deprecated in mpl 2.0 and will be removed in mpl 2.2. Please use the module mpl_finance instead.
我该如何放置mpl_finance
包。 我已将其安装在 pip 中,但正确的导入用语是什么?
import datetime as dt
import matplotlib.pyplot as plt
from matplotlib import style
from matplotlib.finance import candlestick_ohlc
import matplotlib.dates as mdates
import pandas as pd
import pandas_datareader.data as web
from googlefinance import getQuotes
import json
from datetime import datetime
from forex_python.converter import CurrencyRates
from yahoo_finance import Share
要导入通过 pip 安装的名为x
的模块,您通常希望执行import x
。
所以在这里
import mpl_finance
或获得其功能之一,例如
from mpl_finance import candlestick_ohlc
新版本可以在这里找到: https : //pypi.org/project/mplfinance/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.