From: Tait <gnu...@t4...> - 2012-05-17 17:56:42
|
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) > 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. 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 '-'". |