From: Jon G. <jo...@th...> - 2014-04-28 10:59:36
|
> >> However, if you want to do this sort of thing it does not require a > >> patch to gnuplot, just use a function. > >> > >> max(x) =(if (x>biggest)?biggest=max:(x)) > >> biggest=-1e-134; plot datafile 1:max($2) > >> plot datafile 1:($2/biggest) > > > > Ah, of course, why didn't I think of that?! > > Thats also somthing which can be done with the stats command: > > stats datafile using 2 > plot datafile using 1:($2/STATS_max) Actually, there is one use-case not covered by these approaches, and that is when doing a "live" plot where replot is called repeatedly and the underlying datafile changes. In these situations (unless I'm mistaken), STATS_MAX/biggest won't be recomputed, and so the scaling will be incorrect. A smoothing filter would continue to work in this case. Any thoughts on how rescaling on replot might be achieved without a patch? |