From: sfeam (E. Merritt) <eam...@gm...> - 2012-05-19 15:38:01
|
On Saturday, 19 May 2012, pl...@pi... wrote: > A test of whether the behaviour is the same would be to use a variable > to define the data source: > > datasrc='file1.dat' > plot datasrc, datasrc > > datasrc='-' > plot datasrc, datasrc > > It would be nice if gnuplot was data source agnostic in that way, but I > can see why it was thought to be more useful to treat '-' as a special case. You should probably add to the mix: datasrc="< date +%N" All three of these work. Does that make the program "source agnostic"? The first will probably produce the same result twice, though only if the file contents are unchanged. The second may or may not produce the same result twice, depending on what is in the input stream. The third definitely will not find the same number twice. It's fair enough to say that the second option, '-', doesn't do what you want. But I don't see the logic for calling it a special case. It's one of several options for defining a data source. Use it only if it is suitable. Empty quotes '' mean "use the previous data _source_", not "use the previous _data_". Anyhow, I would find it helpful to hear more about the use cases where reading data from a separate file is not suitable. Is it just a concern that the script and the data will get separated? Are there technical issues about multiple data files? Speed? Would it solve the problem if you could define a separate datablock in the same input file (separate from the 'plot' command line)? |