stats can help you to do some statistical works easily. For example, correlation coefficient:
Take a look of chapter “Stats” in gnuplot manual first.
datashould be replaced with your data file or data variable.
Now, all statistics data have been generated automatically and ready to be used.
“A” is to be set as prefix.
For example, variable
A_correlation is the correlation coefficient value between col 5 & 4.
Update: Sorry, it’s correlation coefficient, not R2.
Add a label to show correlation coefficient on the plot:
||correlation coefficient between x and y values|
||A corresponding to a linear fit y = Ax + B|
||B corresponding to a linear fit y = Ax + B|
So we can define a linear equation
y = mx + c to draw it: