Plotted Set of Data

Plot of the data set $\mathcal{D}$ which will be used throughout the cubic spline interpolation article except for the example section, defined as $\mathcal{D}=\left\{ \left(-1.5,-1.2\right),\left(-.2,0\right),\left(1,.5\right),\left(5,1\right),\left(10,1.2\right),\left(15,2\right),\left(20,1\right)\right\}$

LaTeX source

\documentclass[11pt]{article}

% graphics
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\usepgfplotslibrary{fillbetween}


\begin{document}
	\begin{tikzpicture}

		\pgfplotsset{
			scale only axis,
		}

		\begin{axis}[
			xlabel=$x$,
			ylabel=$y$,
			samples=100,
			]\addplot [only marks] table {
-1.5 -1.2
-.2 0
1 0.5
5 1
10 1.2
15 2
20 1
};
		\end{axis}

	\end{tikzpicture}

\end{document}
(0 Posts)
Zürich-based Software Engineer with Google and Founder of Denk Development. Opinions are my own. I am interested in data science, software engineering, 3d-printing, arts, music, microcontrollers, and sports.
View all author’s posts