Keywords: Piecewise constant.png Piecewise_constant svg Illustration of constant interpolation more precisely en Nearest neighbor interpolation on the same dataset as listed in Interpolation self-made in Gnuplot 2007-06-22 Berland Gnuplot source code set terminal png font /usr/share/fonts/truetype/ttf-bitstream-vera/Vera ttf size 300 300 crop set output Piecewise_constant png set key off set xzeroaxis set xtics axis 1 1 set ytics nomirror 1 set border 2 set yrange -1 1 1 1 plot 'pointssteps txt' with fsteps linetype 3 linewidth 4 \ 'points txt' with points linetype 1 pointtype 7 pointsize 1 5 \ 0 with lines -1 Datafiles pointssteps txt 0 0 0 5 0 1 5 0 8415 2 5 0 9093 3 5 0 1411 4 5 -0 7568 5 5 -0 9589 6 0 -0 2794 points txt 0 0 1 0 8415 2 0 9093 3 0 1411 4 -0 7568 5 -0 9589 6 -0 2794 Interpolation |