Black Lives Matter. Please consider donating to Black Girls Code today.

How to plot both OHLC and Volume

Hello,

This question has been asked many times but almost never answered. I’d like to show both a candlestick chart and the volume below. Of course, both charts must share the same x-axis (but not the same y-axis!) so that scrolling the candlestick chart also scrolls the volume chart.

I tried add_trace or a list of figures to plot() to no avail.

Thanks in advance,
Mark

Hello @Mark531, welcome to the forum! Could you use subplots with a shared x-axis as in https://plot.ly/python/subplots/#subplots-with-shared-xaxes?

1 Like

Awesome! The option that did the ting was shared_xaxes=True.

Thank you!