After searching through all pipes to and inbuilt functions in gnuplot, I still haven't found a simple way to access the nth element of my datafile (not through increment, the single value) for use as a constant in a function (or parameter in a for loop) for my plots. For example I have a monotonic decreasing datafile with two columns and I want to normalize the y values while plotting so the y ranges from one (1) to zero (0) by subtracting the last value from each datapoint and dividing the subtraction by the difference between the first datapoint and the last. I tried awk but I'm not too familiar with the syntax. If there is a simple way I would love to know.
For example
plot "my2columndata.dat" using 1:(($2-'lastdatapoint')/('firstdatapoint'-'lastdatapoint'))
or something of the sorts where first and last datapoints are eponymous - they are the first and last datapoints in the monotonic decreasing datafile "my2columndata.dat"