Update app.py
Browse files
app.py
CHANGED
@@ -213,9 +213,7 @@ def setup_figure(env):
|
|
213 |
|
214 |
# Total population over time
|
215 |
for cell_type, counts in env.population_history.items():
|
216 |
-
fig.add_trace(go.Scatter(y=counts, mode='lines', name=cell_type), row=1, col=2)
|
217 |
-
|
218 |
-
# Individual population charts
|
219 |
for i, cell_type in enumerate(cell_types):
|
220 |
if cell_type == "modified":
|
221 |
fig.add_trace(go.Scatter(y=env.population_history[cell_type], mode='lines',
|
@@ -302,6 +300,6 @@ while True:
|
|
302 |
try:
|
303 |
fig = q.get(timeout=0.1)
|
304 |
chart_placeholder.plotly_chart(fig, use_container_width=True)
|
305 |
-
except queue.Empty:
|
306 |
time.sleep(0.1)
|
307 |
-
|
|
|
213 |
|
214 |
# Total population over time
|
215 |
for cell_type, counts in env.population_history.items():
|
216 |
+
fig.add_trace(go.Scatter(y=counts, mode='lines', name=cell_type), row=1, col=2)# Individual population charts
|
|
|
|
|
217 |
for i, cell_type in enumerate(cell_types):
|
218 |
if cell_type == "modified":
|
219 |
fig.add_trace(go.Scatter(y=env.population_history[cell_type], mode='lines',
|
|
|
300 |
try:
|
301 |
fig = q.get(timeout=0.1)
|
302 |
chart_placeholder.plotly_chart(fig, use_container_width=True)
|
303 |
+
except queue.Empty:
|
304 |
time.sleep(0.1)
|
305 |
+
continue
|