More Space between two stacked Subplots

Hi,
I’m using two graphs (Stackes Subplot - One column, two rows) on my Dash. I need more space between the Plots.

How can I change/set this space???

BR
Torsten

You can use the specs and vertical_spacing arguments of make_subplots to add more space between the graphs:

from plotly.subplots import make_subplots
import plotly.graph_objects as go

trace1 = go.Scatter(
     x=[1, 2, 3],
     y=[4, 5, 6]
)
trace2 = go.Scatter(
     x=[1, 2, 3],
     y=[6, 5, 4],
)

figure = make_subplots(
    rows = 2, 
    cols = 1, 
    specs = [[{}], [{}]],
    vertical_spacing = 0.25
)

figure.append_trace(trace1, 1, 1)
figure.append_trace(trace2, 2, 1)

1 Like

Perfect, this is exactly what I need :slight_smile:

thx
Torsten