Я пытаюсь построить график свечи в питоне, используя mpl_finance
,
Я не получаю хороший сюжет, а скорее уродливое пятно, похожее на это:

это мой код:
import pandas
import matplotlib.dates as mdates
import matplotlib.pyplot as plt
from matplotlib.dates import DateFormatter
from mpl_finance import candlestick_ohlc
# candles looks like this:
# [DatetimeIndex(['2018-11-05 11:00:00', '2018-11-05 12:00:00',
# '2018-11-05 13:00:00', '2018-11-05 14:00:00',
# '2018-11-05 15:00:00', '2018-11-05 16:00:00',
# '2018-11-05 17:00:00', '2018-11-05 18:00:00',
# '2018-11-05 19:00:00', '2018-11-05 20:00:00'],
# dtype='datetime64[ns]', name='date', freq=None), array([0.9432 , 0.94233, 0.94175, 0.94218, 0.94278, 0.94331, 0.94289,
# 0.94447, 0.94523, 0.94599]), array([0.94328, 0.94245, 0.94268, 0.9428 , 0.94404, 0.94352, 0.94458,
# 0.94534, 0.94608, 0.94619]), array([0.9423 , 0.94169, 0.94173, 0.9417 , 0.94213, 0.94288, 0.94283,
# 0.94387, 0.94515, 0.94504]), array([0.94234, 0.94174, 0.94218, 0.94278, 0.94331, 0.94289, 0.94447,
# 0.94523, 0.94599, 0.94515])]
fig, ax = plt.subplots()
dates = mdates.date2num(candles[0].to_pydatetime())
quotes = [tuple([dates[i],
candles[1][i],
candles[2][i],
candles[3][i],
candles[4][i]]) for i in range(len(dates))] #_1
candlestick_ohlc(ax, quotes, width=0.6)
fig.autofmt_xdate()
fig.tight_layout()
ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y-%m-%d'))
ax.grid(True)
plt.show()
Я пробовал много вещей, но не могу понять, что здесь не так, какие-нибудь подсказки?
спасибо заранее.