I am using a python-script to plot voltage that I am monitoring with my RaPi. The relevant code looks like this:
while True:
y=readChannel(0)
plt.axis([0, 100, -10, 10])
plt.ion() #plot interactively
plt.scatter(x, y)
plt.pause(0.05) #for the plot not to freeze
time.sleep(1)
x += 1
The live-plotting works just fine but I also want the program to save the graph that I see every once in a while. I've tried the plt.savefig() command but then my live plot would not run. Does anyone have an idea how to do that?
Any advice would be appreciated =)
Regards Steve