Created
October 15, 2016 16:38
-
-
Save larsgroeber/b9c29c8bc68a66b03571bf12592527e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/gnuplot | |
set terminal wxt size 350,262 enhanced font 'Verdana,10' persist | |
# set terminal dumb | |
file="`echo $plot_file`" # make sure to set the $plot_file environment variable first | |
f(x) = a*x+b | |
a = 1 | |
b = 1 | |
fit f(x) file via a,b | |
title_f(a, b) = sprintf('f(x) = %.2f*x+%.2f', a, b) # display the final a and b values on the chart | |
plot f(x) t title_f(a,b), file | |
pause mouse keypress |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment