|
From: <pl...@pi...> - 2015-09-29 22:07:04
|
Le 29.09.2015 18:14, sfeam a écrit : > On Tuesday, 29 September 2015 12:04:04 PM pl...@pi... wrote: > >> Hi > >> > >> I am producing a graph ( SVG ) by using load command. > >> > >> To refresh it periodically, I have a pause and a reread at the end. > > You can only have one plot in an svg output file, "refresh it" is > > not an option. You would have to close it, reopen another file > > with the same name, and write a new plot into it. > > Is that what your script does? > > "reread" only resets the input file, not the output file. > > It is possible you misunderstand where the "reload" command > > needs to go. Is there an "unset output" before it? > >> The problem is the reread does NOT reread the file. I seems to have > an > >> internal buffer and just pretends to reread. > > Not sure who you mean by "I". sorry, typo, I meant "it" ie gnuplot as you surmised. > > If you mean gnuplot, then no. > > But if you mean the operating system, then probably yes. > > Gnuplot's "reread" command tells the system to go back to the > > beginning of the file. That is a "rewind" operation, not a > > "close and re-open for reading" operation. > >> I can not find anything that would force an actual reread of the > file. > >> > >> It would be extremely useful if it did really reread the file on > disk > >> since this would allow another process to modify it. > > No, sorry. File systems don't work that way. If somebody else > > writes on top of a file you already have open for reading, that > > is probably not going to do what you seem to expect. > > > I seem to recall that there was some complication with this same > >> functionality needing to support pipes or direct input. > >> > >> Is there not a way to force a actual reload of the file? Maybe a ' > >> reread really ' option. > > Ethan Thanks, reread is basically doing a seek(0), not a close and open which I what I was looking for, which is why I was looking for "reread really" type solution. Reread does what it says, in fact. What I was needing was a 'reload'. That would indeed require closing the output file before using it. Yes, I do close the svg by unset output; regard, Peter. |