On Oct 10, 2007, at 12:53 PM, massimo sandal wrote:

> sidimok ha scritto:
>> I would write down an MPL script that loads a block data,  
>> generated on the
>> fly (in a file) by another computing program, at a regular time  
>> rate, let's
>> say every 30". The script may have an "exit button" to stop it,  
>> and it might
>> proceed this way:
>> 1. time = time_old
>> 2. Load the "data" from lines 0 to -1(EOF)
>> 3. Save "data" length: N = len(data)
>> 4. plot
>> 5. After time_new-time_old = time_step
>>    5a. load "data_tmp" from lines N to -1
>>    5b. extend "data" with "data_tmp"
>>    5c. plot
>>    5d. Go back to step 5, or press "Stop" button
>> Does anyone have an idea how to encode this purpose?
>
> I don't really understand what the problem is. If you don't you  
> know how
> to wait a definite time between loading the file, have a look at the
> time module:
>
> http://docs.python.org/lib/module-time.html
>
> especially time.sleep()
>
> m.

I would venture a guess that the problem is how to update the plot.
I have not investigated this problem, but I have a hard time figuring
out how matplotlib deals with updating plots after plot.show() has
been called to plot to the screen the first time.

Cheers
   Tommy 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to