I adapted my answer from this thread because the chart seemed to be pretty similar. There might be other ways to do this, but since I had this chart in my mind, I adapted it

import plotly.graph_objects as go
import numpy as np
import random
# set number of days
days = 10
# set number of hours
hours = 24
# add one hour for use in range()
hours += 1
# create data
categories = []
for i in range(1, days + 1):
categories.extend([f'day_{i}'] * hours)
types = [i for i in range(hours)] * days
values = [random.choice(['x','-']) for _ in range(days * hours)]
# create figure
fig = go.Figure(
data=go.Scatter(
y=categories,
x=types,
text=values,
mode='text'
),
layout={'height': 600, 'width': 600}
)
fig.update_xaxes(
tickmode='array',
ticktext=[*range(hours)],
tickvals = [*range(hours)]
)