aboutsummaryrefslogtreecommitdiff
path: root/calibration/power/plot
blob: c4703d01a948b7cd3dd4cbb1f5ce8a35b682e561 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env gnuplot

set terminal pdf enhanced font 'Helvetica,14' size 16cm,12cm

f(x) = a*x+b;
fit f(x) "data.dat" using 2:1 via a,b

set grid
set title "Voltage to measured ADC"
set xlabel "ADC value"
set ylabel "Voltage [mV]"

plot "data.dat" using 2:1 with points title "data points", \
	 f(x) with lines title sprintf('linear fit curve mV(x) = %.5f·x%+.5f', a, b)