eaglelandsonce commited on
Commit
ba3f31c
·
verified ·
1 Parent(s): 0e17fbc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -3
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
- st.pyplot(fig) # Use this line if integrating with Streamlit
 
 
 
 
 
 
 
 
 
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())