Re: continuous update of plot [message #9117] |
Tue, 03 June 1997 00:00  |
David Foster
Messages: 341 Registered: January 1996
|
Senior Member |
|
|
Tim Patterson wrote:
>
> A quick test is to use the spawn command to list the file,
> save the returned data, and then next time around the loop, you can do
> the same and see if the returned string has changed.
>
>
> ������� �������� wrote:
>>
>> Hello,
>>
>> suppose I have a simulation that every so often writes out a 2d array.
>> Is there a way for idl to detect that the file has changed, and
>> replot or display the new data?
>> This would be under unix (digital and/or sparc) with the data
>> being produced by fortran.
>>
If you do not want to have to be in a loop when the plot gets
updated, you could do what Tim suggests but use timer events
so that the file is "polled" every N seconds, and the plot updated
accordingly. This way, you could have the plot updated while you are
doing other useful things with your program.
dave
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2200
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
"I have this theory that if we're told we're bad,
then that's the only idea we'll ever have.
But maybe if we are surrounded in beauty,
someday we will become what we see." - Jewel Kilcher
|
|
|