【发布时间】:2021-09-10 14:03:08
【问题描述】:
我想绘制一张像上面那样的图像(photoshopped)。
我尝试使用mpf.make_addplot(data,type='scatter'),但数据框(数据)与行不匹配。
这条线代表蜡烛的中间,所以我想用蜡烛的所有一半制作一个列表,然后在这些坐标中应用点,但我相信有更好的方法 有没有办法解决这个问题并实现自动化?
一些代码:
import mplfinance as mpf
# Here i get the dataframe from yahoo and get the last 50 candles
savefig = dict(fname="test.jpg", bbox_inches="tight")
mpf.plot(data, type='line', axisoff=True, savefig=savefig)
提前致谢。
【问题讨论】:
标签: pandas dataframe plot yahoo-finance mplfinance