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

Separate dotted lines over multiple barplots

Hi

I have tried searching but couldn’t find anywhere the issues I’m facing. What I want to create is a horizontal line spanning over multiple bar-plots but in a limited area according to the y-values. Something like this:

This is my code so far:

week_text = ["M", "T", "W", "T", "F"]
layout = go.Layout(xaxis={'type': 'category'})
fig_days = go.Figure(go.Bar(x=monday_all_mean.name, 
                       y=monday_all_mean.occ, 
                       text=week_text[0], 
                       textposition='inside', 
                       marker=dict(color=colors)),
                layout)
fig_days.add_trace(go.Bar(x=tuesday_all_mean.name,
                          y=tuesday_all_mean.occ,
                          text=week_text[1],
                          textposition='inside', 
                          marker=dict(color=colors)))
fig_days.add_trace(go.Bar(x=wednesday_all_mean.name,
                          y=wednesday_all_mean.occ,
                          text=week_text[2],
                          textposition='inside', 
                          marker=dict(color=colors)))
fig_days.add_trace(go.Bar(x=thursday_all_mean.name,
                          y=thursday_all_mean.occ,
                          text=week_text[3],
                          textposition='inside', 
                          marker=dict(color=colors)))
fig_days.add_trace(go.Bar(x=friday_all_mean.name,
                          y=friday_all_mean.occ,
                          text=week_text[4],
                          textposition='inside',
                          marker=dict(color=colors)))
fig_days.add_trace(go.Scatter(x=names_all_mean.name, 
                              y=names_all_mean.occ, 
                              mode='markers+text', 
                              text=text, 
                              textposition="top center",
                              marker = {"size": 5, "symbol": 'square', 'color': 'black'},
                              textfont=dict(
                                  family="sans serif", 
                                  size=20)))

fig_days.update_layout(title_text='Average: Rooms - Working Days - 07:00-17:00',
                       xaxis_title="Rooms",
                       yaxis_title="Average Occupancy", 
                       showlegend=False)
pio.show(fig_days)

Hope there is someone that can help. Thanks in advance!