matplotlib real time grap.

L

luca72

Hello at all.
I need to do a real time plot where on the frame i have this like limit
line:
import math
dati = []
for freq in range(int(freqiniziale), (int(freqfinale )+ 1)):
forza = float(massa) * ((2*math.pi*freq)**2)/10
dati.append(forza)
ax1 = subplot(111)
plot(dati)
xlabel('Frequenza HZ')
ylabel('Deg')
title('Grafico Calibrazione')
ax2 = twinx()
plot([0.1,0.2,0.3],'r-')
ylabel('Forza')
ax2.yaxis.tick_right()
#dlg = wx.FileDialog(self, "Choose a file", ".", "", "*.*",
wx.SAVE)
#try:
# if dlg.ShowModal() == wx.ID_OK:
# filename = dlg.GetPath()

# savefig(filename+'.pdf')
#finally:
# dlg.Destroy()
show()

with this i have the grap on the screen but i have to update every time
that i receive others data coming from two instruments (10 seconds),
how i can update the grap?

Regards

Luca
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,228
Latest member
MikeMichal

Latest Threads

Top