File:Piecewise constant.png
File:Piecewise constant.svg is a vector version of this file. It should be used in place of this PNG file.Category:Superior vector version available
File:Piecewise constant.png → File:Piecewise constant.svg
For more information, see Help:SVG. |
Summary
| Description | Illustration of constant interpolation, more precisely en:Nearest neighbor interpolation on the same dataset as listed in Interpolation. |
| Date | |
| Source | self-made in Gnuplot |
| Author | 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
Licensing
| This work has been released into the public domain by its author, Berland. This applies worldwide. In some countries this may not be legally possible; if so: Berland grants anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law. |