|
From: Petr M. <mi...@ph...> - 2006-03-03 18:05:35
|
>> Example 1:
>> plot 'measure.dat'
>> if fileexist('fit.dat') replot 'fit.dat'
>> pause 5
>> reread
>
> So far as I know, with the current cvs version you might
> just as well say
> plot 'measure.dat','fit.dat'
> pause 5
> reread
>
> A missing data file should no longer prevents the plot from being
> constructed.
No:
gnuplot> plot 'a.dat', 'bla'
^
can't read data file "bla"
util.c: No such file or directory
>> Example 2:
>
> I do not follow you there at all.
It was not a good example, sorry.
So, I'll commit the "fileexist" patch which uses fopen().
>> Actually, what some users ask for real-time plotting, is something
>> like
>> pause untilfileexist "next.dat"
>> pause untilfilechanged "next.dat"
>
> I doubt there is a universally portable solution to this one.
> It is difficult even if you restrict the solution to linux/unix.
Why? What about "select" and "stat" functions? If select() is not available,
a poor-man solution is to check the status with one-second resolution.
(Well, I never used select() but I think it provides the waiting.)
---
PM
|