Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,15 @@ def animate(i):
|
|
17 |
plt.cla() # Clear the current axes.
|
18 |
plt.plot(x_vals, y_vals)
|
19 |
|
20 |
-
fig, ax = plt.subplots() # Create a figure and an axes to plot.
|
21 |
-
ani = FuncAnimation(fig, animate, interval=1000)
|
22 |
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
plt.cla() # Clear the current axes.
|
18 |
plt.plot(x_vals, y_vals)
|
19 |
|
20 |
+
# fig, ax = plt.subplots() # Create a figure and an axes to plot.
|
21 |
+
# ani = FuncAnimation(fig, animate, interval=1000)
|
22 |
|
23 |
+
ani = FuncAnimation(plt.gcf(), animate, interval=1000)
|
24 |
+
|
25 |
+
|
26 |
+
# st.pyplot(fig) # Use this line if integrating with Streamlit
|
27 |
+
|
28 |
+
plt.tight_layout()
|
29 |
+
|
30 |
+
|
31 |
+
st.write(plt.show())
|