问题描述
我想在包含烛台的 Pandas 中绘制一个数据框,增加和减少的蜡烛都必须具有相同的颜色,除了我选择的一些。
我真的很难找到解决方案。
我尝试了 mplfinance、plotly、finplot,我可以改变所有蜡烛的颜色,但不仅改变某些蜡烛的颜色。
如果不能单独修改颜色,我至少希望沿着与烛台对应的图形绘制垂直线。
我可以识别受数据帧索引及其时间影响的蜡烛图。
帮助会很有用,提前致谢。
一些代码行:
import finplot as fplt
...
# I receive the data from yahoo finance and save it in the pdOHLCVs dataframe
colorBlue = "#0509fc"
fplt.candle_bear_color = colorBlue
fplt.candle_bull_color = colorBlue
fplt.candle_bull_body_color = colorBlue
fplt.candlestick_ochl (pdOHLCVs [['open','close','high','low']])
# here I want to be able to change the color for example at candle 12
# here I want to be able to change the color for example at candle 29
# here I want to be able to change the color for example at candle 56
fplt.show()
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)