here is a graph to demonstrate how signal sampling work:
\documentclass[french]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{pgfplots}
\usepackage{tikz} % State diagram
\usepgfplotslibrary{fillbetween} % For pgfplot integral
\pgfplotsset{compat=1.12} % For pgfplot integral
\usetikzlibrary{babel} % For pgfplot integral
\pgfplotsset{
standard/.style={
axis x line=middle,
axis y line=middle,
enlarge x limits=0.15,
enlarge y limits=0.15,
every axis x label/.style={at={(current axis.right of origin)},anchor=north west},
every axis y label/.style={at={(current axis.above origin)},anchor=north east},
every axis plot post/.style={mark options={fill=white}}
}
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
standard,
domain = 0:15,
samples = 16,
xlabel={$n$},
xmin=0,
ylabel={$x[n]$}]
\addplot+[ycomb,black,thick] {sin(2*180*x/13)};
\addplot[name path=f, domain=0:15, samples=100, color=blue] {sin(deg(0.485*x))};
\addplot[draw=none, name path = xaxis, domain=0:15] {0};
\addplot[orange!50] fill between [of=f and xaxis];
\end{axis}
\end{tikzpicture}
\end{document}
However, i would like to have the number 8, 10 and 12 above the y line, and all other number below. How can i do that ?
xtick={2,4,6,14,16}
andextra x ticks={8,10,12}
, and the style changes as in that question?