No, you cannot use stats
inside of inline funcitons. Gnuplot functions are very basic and can contain only 'regular' mathematical function which compute a single numerical value. You cannot get access to data files inside of functions.
The stats
command is command, which is the only command besides plot
and splot
which has access to data files.
The use of stats
is as follows: You must use it as standalone command like
stats 'filename' using 8 name "L"
after which you have access to many variables which contain results from calculations on your data (column 8 in file filename
). L_mean
is one of those variables, for more see show variables
after having executed stats
.
However, you can do many calculations inside the using
statement. To subtract the mean from you data, use e.g.:
stats 'filename' using 8 name "L"
plot 'filename' using ($8-L_mean)