Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Plotting and fitting values to a linear equation from CSV data with gnuplot
set datafile separator ';'
set terminal png
set output 'values.png'
f(x) = a*x + b
fit f(x) 'values.csv' using 1:2 via a, b
plot 'values.csv' using 1:2, f(x) title sprintf('%.2fx + %.2f', a, b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.