Basic of GNUPlot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
418 B

2 years ago
  1. set terminal qt
  2. clear
  3. set datafile separator ","
  4. set style line 1 lc rgb "black" lt 3 lw 2 pt 2 ps 1 dt 3
  5. set title "Figure Title"
  6. set xlabel "time in $s$"
  7. set ylabel "amp"
  8. set label 1 "some text" at 20, 40
  9. set key box left
  10. f(x) = a + b*x
  11. fit f(x) "data.csv" using 0:1 via a, b
  12. plot "data.csv" u 0:1 w lp ls 1 title sprintf("y=a+b*x, a=%.3f; b=%.3f", a, b), f(x) with lp ls 1
  13. #plot "data.csv" using 0:1 with lp ls 1