Real time plot
jfcanac at free.fr
Fri Oct 5 10:48:39 CEST 2007
"Lawson Hanson" <lawsonhanson at optusnet.com.au> a écrit dans le message de
news: 4705e3f5$0$31086$afc38c87 at news.optusnet.com.au...
> Nicholas Bastin wrote:
>> On 10/4/07, Jean-Francois Canac <jfcanac at free.fr> wrote:
>>> mailman.1493.1191484119.2658.python-list at python.org...
>>>> I would draw dots on a suitably sized Tkinter canvas, after drawing a
>>>> of the race track (laborious).
>>>> 20 per second will be no problem, provided the machine is half decent.
>>>> What is the speed at which the com port runs?
>>>> - Hendrik
>>> The com port run at 19.2 kb/s.
>>> My pb is more the real time aspect: to see the plot changing in real
>>> than the com aspect as the installation is already running with programs
>>> The PC on which it is running is good enought
>>> For me the interest is to migrate all taht on python to be able to make
>>> changes when it is of interest
>> The success of this will have more to do with design than programming
>> language. Any GUI toolkit which allows partial screen updates can be
>> made to update at least as fast as your screen refresh rate, even in
> If you are using Tkinter (probably a very good choice), just remember
> to make periodic (i.e., once per I/O processing loop) calls to:
> which will update the display window, etc.
Finally I tried this coding and it works
lat,long,vit = pylab.load(r"c:\pytst\test1.txt",usecols=(1,2,3),
timefig = pylab.figure(1)
timesub = pylab.subplot(111)
lines = pylab.plot(x,y)
for i in range(len(lat)):
The kind of data I have in the text file are just below
Now I have two problems, I think my coding is not very clean as when I try
yo close or manipulate the windows it generates an error
secondly I think it is a bit slow. I would much prefer something quicker and
to be able to adapt the speed dynamically with a sleep instruction or
something as that
09:25:08.50 46.863930 3.161866 56.9 Km/h
09:45:07.75 46.863907 3.161786 11.5 Km/h
09:45:08.0 46.863914 3.161794 12.4 Km/h
09:45:08.25 46.863918 3.161804 13.4 Km/h
09:45:08.50 46.863922 3.161814 14.5 Km/h
09:45:08.75 46.863930 3.161825 15.4 Km/h
09:45:09.0 46.863934 3.161837 16.1 Km/h
09:45:09.25 46.863941 3.161848 16.6 Km/h
09:45:09.50 46.863945 3.161861 17.1 Km/h
09:45:09.75 46.863953 3.161874 17.3 Km/h
More information about the Python-list