make_subplots python 中的不同x轴

问题描述 投票:0回答:1

嗨,我想用不同时间的 make_subplots 绘制两个图 我该怎么做

fig = make_subplots(rows=2, cols=1,row_heights=[0.5, 0.5], shared_xaxes=True)
                            
                            fig.add_trace(go.Candlestick(x=dfpl.index, open=dfpl['open'], high=dfpl['high'], low=dfpl['low'], close=dfpl['close']), row=1, col=1)
                            fig.add_trace(go.Candlestick(x=dfDiv.index, open=dfDiv['open'], high=dfDiv['high'], low=dfDiv['low'], close=dfDiv['close']), row=2, col=1)

我的索引是日期时间并且不同 图表如下:

python datetime plotly candlestick-chart x-axis
1个回答
0
投票

有谁可以帮助我吗????

© www.soinside.com 2019 - 2024. All rights reserved.