0

I am new to Matplotlib and have spent much time trying to figure out how to update my simple Matplotlib plot after the first run through my code. After i generate the plot, my code stops after the plot.show(). How do i get my code past this point to reload new data from my list? Here's a summary of my code:

import matplotlib.pyplot as plt

# here i have code that generates new_data every 2 minutes

data-gathering code
new_data = [1,3,4,6,-4,2,11]

#here i display that data, but i cant get my code to get past the first display of the plot so it can generat new data and add it to the plot
    plt.plot(new_data, 'ro')
    plt.ylabel('my data results')
    plt.show()
unutbu
  • 842,883
  • 184
  • 1,785
  • 1,677

0 Answers0