Skip to content

Instantly share code, notes, and snippets.

@andreasjansson
Last active February 14, 2016 19:35
Show Gist options
  • Save andreasjansson/a675ef49e6999f951c67 to your computer and use it in GitHub Desktop.
Save andreasjansson/a675ef49e6999f951c67 to your computer and use it in GitHub Desktop.
4PL curve fitting with gnuplot
$ gnuplot -e 'set term dumb size 100, 30; set fit quiet; set xr [1000:20000]; f(x) = (a - d) / (1 + ((x / c) ** b)) + d; fit f(x) "acc.txt" u 1:2 via a, b, c, d; p "acc.txt" u 1:2 w l notit, f(x) w l notit'
80 ++---+--------+---------+---------+--------+---------+--------+---------+--------+--------++
| + + + + + + + + + +
79 ++ #################
| * *******############## |
| * *****************#** |
78 ++ * ** ************ *** * * ++
| ***************** |
77 ++ **********#** ++
| ** ********* |
76 ++ ********** ++
| ******** * |
75 ++ * *** * * ++
| ***** * * |
| * **** |
74 ++ **** * ++
| **** * |
73 ++*** ++
|**** |
72 +**** ++
|**** |
71 +* ** ++
** ** |
** * |
70 ** * ++
* + + + + + + + + + +
69 ++---+--------+---------+---------+--------+---------+--------+---------+--------+--------++
2000 4000 6000 8000 10000 12000 14000 16000 18000 20000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment