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.

In other languages
Alemannisch  العربية  беларуская (тарашкевіца)  български  বাংলা  català  нохчийн  čeština  dansk  Deutsch  Ελληνικά  English  British English  Esperanto  español  eesti  euskara  فارسی  suomi  français  Frysk  galego  Alemannisch  עברית  हिन्दी  hrvatski  magyar  հայերեն  Bahasa Indonesia  Ido  italiano  日本語  ქართული  한국어  lietuvių  македонски  മലയാളം  Bahasa Melayu  မြန်မာဘာသာ  norsk bokmål  Plattdüütsch  Nederlands  norsk nynorsk  norsk  occitan  polski  prūsiskan  português  português do Brasil  română  русский  sicilianu  Scots  slovenčina  slovenščina  српски / srpski  svenska  தமிழ்  ไทย  Türkçe  татарча / tatarça  українська  vèneto  Tiếng Việt  中文  中文(中国大陆)  中文(简体)  中文(繁體)  中文(马来西亚)  中文(新加坡)  中文(臺灣)  +/−
New SVG image

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

Public domain 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.
Category:Self-published work#Piecewise%20constant.pngCategory:PD-self#Piecewise%20constant.png Category:Interpolation
Category:Interpolation Category:PD-self Category:Self-published work Category:Superior vector version available