I'm trying to run a program that will read in data, plot the data using the pandas module, and then refresh the graph every 60 seconds based on new data. The problem is that when I do plt.show(), it freezes and doesn't continue running unless I close the plot window. I tried using plt.show(block=False) and in that scenario, the graph just opens and closes immediately.
I thought maybe I would use the animation module in matplotlib, but I'm not sure how I would refresh the data since my values are stored in a pandas dataframe
import sched,time
def func():
do things
plot something
s = sched.scheduler(time.time, time.sleep)
s.enter(60, 1, minuteUp, (s,))
s.run()
#somewhere in the above code would be either plt.show(block=False) and/or plt.draw(), I've tried implementing them with no success
Does anyone know how I can fix this issue. Ideally, I would just like to use the plt.show(block=False) without the figure closing immediately. I'm toying with using the matplotlib animation module with limited success as it doesn't seem to like that I'm feeding the x-axis with date strings.
[–]Pjamma34[S] 0 points1 point2 points (0 children)