Reading dataset value into a gnuplot variable (start of X series)

后端 未结 4 1196
南方客
南方客 2020-12-11 02:57

I originally thought this may be the same as gnuplot - start of X series - Stack Overflow - but I think this is slightly more specific.

Since I\'m interested in fin

4条回答
  •  星月不相逢
    2020-12-11 03:33

    Hmmm... OK, I got something:

    initer(x) = (!exists("first")) ? first = x : first ;
    plot "inline.dat" using ($1-initer($1)):2 with impulses linewidth 2
    

    ... but this looks more like "capturing" a variable, than reading it (as the function initer is being used to scan a stream of numbers, detect the first one, and return its value) :) Hope there is a better way of doing this ....

提交回复
热议问题