Julian
1
Hi,
I was wondering if itβs possible to create a plot with 3 subplots arranged vertically (https://plot.ly/python/subplots/) that have a shared x-axis, along with a range slider that controls the x-axis (https://plot.ly/python/range-slider/)?
Any help is appreciated.
Thanks,
Julian
1 Like
Hi,
-
If 3 subplots are vertically arranged, they can share the X-axis like this -
fig = make_subplots(rows=3, cols=1, shared_xaxes=True )
-
After using a common X-axis, subplots can be added to the figure.
-
Then range slider can be enabled for the bottom subplot like this -
fig.update_layout(legend_orientation="h",
xaxis3_rangeslider_visible=True, xaxis3_rangeslider_thickness=0.1 )
This range slider will be common and shared by all the subplots.
Cheers