kylemanna
11/18/2013 - 2:37 AM

GNU Plot

GNU Plot

set term svg enhanced size 5000,750
set mxtics 5
set grid front   linetype 0 linewidth 1.000,  linetype 0 linewidth 1.000
set datafile separator ','

set ylabel 'ADC [raw]'
set xlabel 'Sample [1/7680 s]'

set size 1,1
set origin 0,0
set multiplot

set samples 1280

min = 19800
max = 45500

skip = 1280*00 + 231
len = 1280

r = max - min
mid = r / 2
f = 7680/60

y_off = mid + min
y_scale = mid

x_off = f/2 - skip
x_scale = 2*pi/(f)

set size 1,0.5
set origin 0,0.5
plot [skip:skip+len] \
			y_scale * sin(((x + x_off)) * x_scale) + y_off, \
			'./output.raw.csv' using 3 with linespoint, \
			'./output.raw.csv' using 4 with linespoint

set size 1,0.5
set origin 0,0
plot [skip:skip+len] \
			'./output.raw.csv' using 1 with linespoint, \
			'./output.raw.csv' using 2 with linespoint