Subplots with multiple Axises

As you can see from the first pic thats what iam having right now.
all i want is that for every single shape drowen in the second Figure that it have it own Y-achse, so simply i want to have 4 y-achse.
P.S i dont want to define them manually.

def xyaxes_dom_yaxes_pos(gap=0.1, rows=2):
if rows < 2:
raise ValueError(‘This function works for subplots with rows>2 and cols=1’)
h_window = (1 - gap) / rows # window height
d = 3 / 10 / 2
# xaxis{k} has the domain [w[2],w[-3]] k=1,…rows
# w[1], w[-2] give the left, resp right yaxes position associated to the default yaxis of the plot window
yd =
for k in range(rows):
start = k * (h_window + gap)
end = start + h_window
yd.append([start, end])
w = [0, d, 2 * d, 1 - 2 * d, 1 - d, 1]

return w, yd[::-1]  # yd[::-1]

w, yd = xyaxes_dom_yaxes_pos(gap=0.15, rows=2)

lay = {
‘xaxis’: dict(range=[0.5, max(x_range) + 0.5], dtick=1, anchor=‘y’),
‘xaxis2’: dict(range=[0.5, max(x_range) + 0.5], dtick=1, anchor=‘y2’),
‘yaxis’: dict(anchor=‘x’, domain=yd[0]),
‘yaxis2’: dict(anchor=‘x2’, domain=yd[1])
}

for i in range(len(bits_data)):
yaxis = ‘y’ + str(i + 2)
axis_name = ‘yaxis’ + str(i + 2)
if i == 0:
lay[axis_name] = dict(title=bits_list[i], titlefont=dict(color=colors[i % len(colors)]), anchor=‘x2’,
side=‘left’)
if i == 1:
lay[axis_name] = dict(title=bits_list[i], titlefont=dict(color=colors[i % len(colors)]), anchor=‘x2’,
overlaying=‘y2’,
side=‘right’)
else:
lay[axis_name] = dict(title=bits_list[i], titlefont=dict(color=colors[i % len(colors)]), anchor=‘free’,
overlaying=‘y2’,
side=‘right’,
position=w[i - 1]
)

fig = make_subplots(rows=2, cols=1, shared_xaxes=True)

fig.update_layout(lay)
data =

for key, value in result.items():
fig.append_trace(go.Bar(y=value[‘width’], x=x_range, name=key, base=value[‘base’], offsetgroup=0), row=1, col=1)

for i in range(len(bits_data)):
yaxis = ‘y’ + str(i + 2)
axis_name = ‘yaxis’ + str(i + 2)
fig.append_trace(go.Scatter(y=bits_data[i], x=x_range, name=bits_list[i], mode=“markers”,
marker={‘symbol’: shapes[i % len(shapes)], ‘size’: 8,
‘color’: colors[i % len(colors)]}), row=2, col=1, )

def page(fig):
return html.Div([
html.Div([dcc.Graph(figure=fig)])])

app1.layout = page(fig)
if name == ‘main’:
app1.run_server(debug=False)


^^^^
that iam looking for