import numpy as np
import plotly.graph_objs as go
N = 1000
fig = go.Figure(data=go.Heatmap(
z=M[0],
x=['1', '2', '3', '4', '5'],
y=['Product'],
hoverongaps = False,
colorscale=[[0, '#FF0000'], [1, '#00FF00']]),
layout=go.Layout(
title="Frame 0",
updatemenus=[dict(
type="buttons",
buttons=[dict(label="Play",
method="animate",
args=[None])])]
),
frames=[go.Frame(data=[go.Heatmap(z=M[i])],
layout=go.Layout(title_text=f"T={i}"))
for i in range(1, len(M)-1)])
fig.update_layout(
title="Production vs Target",
xaxis_title="Product",
yaxis_title="Production",
# zaxis_title='State of the production'
)
fig.show()
import plotly.graph_objects as go
fig = go.Figure()
df = pd.DataFrame({})
df['x'] = x
df['ys_1'] = ys_1
df['ys_2'] = ys_2
df['ys_3'] = ys_3
df['ys_4'] = ys_4
df['ys_5'] = ys_5
sns.lineplot(data=df, x="x", y="ys_1")