From: <pl...@pi...> - 2012-05-17 21:45:00
|
On 05/17/12 19:56, Tait wrote: > > I was going to make a point about GB-sized data sets and memory usage > of trying to cache such things, but Ethan helpfully already did so. > Some of the data I work with is intentionally plotted in a raster > format because plotting in a vector format creates file sizes that > overflow memory and filesystem limits. > >> Allin's suggestion would likely be simple to do but could potentially be >> very wasteful. With the increasing importance of mobile and embedded >> devices this may not be too desirable > > I like Allin's suggestion best out of what I've seen suggested here. It > doesn't demand a backward-incompatible change to syntax, does not need > to penalize users with large data sets, and still allows small-dataset > users to cache their data in memory. > >> As I understand it so far, data for each plot line in read in with a >> separate reading of the input data source. > > This is fundamental and unavoidable, because the input to be read might > depend on the data itself. The following is perfectly legal, for example, > and I've even used it before: > > f(x,y,z)=<some function> > g(x)=<some other function> > plot 'datafile' using (column(f($1,$2,$3))):(column(g($4)), \ > 'data2file' using ($1>$2 ? column(g($4)) : 1/0) Hi Tait, I think your example needs to be stripped down to the bare essentials of making the point you are trying to make. I'll have a guess about what you are trying to say, sorry if I miss the mark, and I think you are mistaken. plot 'data2file' using ($1>$2 ? column(g($4)) : 1/0) this plot line requires reading of columns 1,2 and 4 (all lines). When it comes to be processed the plotted points will be evaluated and some of them will be NaN. All these data pairs (including the NaNs) will be stored in slots for later reuse. I also use this kind of construction frequently, I don't see that it has any bearing on what I suggested. > >> 1. unnecessary re-reading of input file > > The file is re-read, yes, but it's not unnecessary. > >> 2. possible plotting of different states of the data in one graph. > > I think any user would not be surprised that a file being modified while > gnuplot is plotting would have undefined results. If this is a concern > for your application, it is incumbent on you to cache or copy-on-write, > or whatever works for your scenario. > >> 3. plot '-' using 1:2 , '' using 1:3 requires two separate datasets (or >> duplication) to be supplied and thus has different behaviour to a >> similar command using a data file. > > I don't understand this. The behavior of '-' is currently the same as > for a data file. What you're suggesting is to make '-' act different than > a normal input file would act. No, you need to read up on how '-' works. This has been covered in a number of posts in this thread. I can see the advantage of specifying a > single data set inline somehow and then referring repeatedly to that one > data set, but that seems like a new and different feature, not really an > extension of "plot '-'". > > regards. |