I have no idea why this happens but when I plot more than 9 graphs, the plots go blank starting from the 1st one.
So let's say I plot 10 graphs, which each of them has 8 subplots, plots go blank excluding the 1st and last subplot. When I plot 11 graphs, 1st and 2nd plots go blank.
The code below works perfect but too many graphs breaks previous plots.
days = df["DATE"].dt.floor("D").unique()
# create axis for each day
fig = plotly.subplots.make_subplots(len(days), subplot_titles=subplot_titles, vertical_spacing=0.03)
for i,d in enumerate(days):
mask = (df["DATE"].dt.floor("D")==d)&(df["IOT_ID"]==iot_id)
splt= px.line(df.loc[mask], x="DATE", y="Vibration")
if len(list(splt.select_traces())) > 0:
fig.add_trace(list(splt.select_traces())[0], row=i+1, col=1)
fig.update_layout(
autosize=False,
width=1000,
height=5000
)
fig.update_layout(title = "IoT ID = " + iot_id + ", Titreşim")
fig.show()
I sort of solved this problem by changing the renderer to a non - interactive one.
Such as
fig.show(renderer="svg", width=1000, height=5000)
But it would be better if all of the plots are interactive
Is this a technical problem or is there a way to make many interactive plots ?