From: Ethan A M. <sf...@us...> - 2012-05-14 18:08:11
|
On Monday, May 14, 2012 10:19:01 am pl...@pi... wrote: > On 05/14/12 18:27, Ethan A Merritt wrote: > > The next obvious thought is "can't we remember the values we just read > > and re-use them if necessary?". But that doesn't work either. > > Consider: > > plot '-' using 1:2, '' using 3:4, '' using 99:100 > > The first plot uses only columns 1 and 2; these values are stored > > internally and could be used again without rereading. That's what the > > "refresh" command does. But the 2nd and 3rd plots use data values from > > columns we didn't use the first time and hence didn't keep. > > So those values can only be recovered by rereading. > > Since this is all in one plot command , couldn't the whole line be > parsed to find all the columns to be required by all the using clauses? > > In fact isn't this already done? Are you implying that > > plot datafile using 1:2, '' using 3:4, '' using 99:100 > > actually reads the data file three times looking at different columns :? Yes. The internal structures that hold data reserve 7 slots for each input data point. These 7 slots are just barely enough to hold x/y/width/xerr/yerr/color/pointsize/etc of the various plot modes. There is no mechanism or structure to store an arbitrary number of additional raw data columns for each line of input. Ethan |