Saturday, December 5, 2015

GNUPlot for 1D smoothing

#!/bin/sh
gnuplot -persist << PLOT

###output cpsline
set table 'cspline.txt'
plot 'test.txt' using 1:2:(5) w lines t '' smooth acsplines
unset table

###output sbezier
set table 'sbezier.txt'
plot 'test.txt' using 1:2:(5) w lines t '' smooth sbezier
unset table

###plot all
plot 'test.txt' using 1:2 w lines t 'input','cspline.txt' using 1:2 w lines t 'cspline','sbezier.txt' using 1:2 w lines t 'sbezier'

quit
PLOT

 

No comments: