0

I would like to visualize convergence of sequences in a similar way as in the following picture of Wikipedia:

k

Can someone help me to draw a similar picture with Tikz? Thank you very much!

  • 2
    Welcome to TeX.SE! Can you show us what you have tried so far and what is your concrete issue now? – Mensch Sep 5 at 14:03
4

It is very easy to draw such things since TikZ parses its expressions.

\documentclass[tikz,border=3mm]{standalone}
\begin{document}
\begin{tikzpicture}
 \draw[stealth-stealth] (0,5) |- (8,0) node[right]{$n$};
 \pgfmathsetseed{7}
 \draw plot[variable=\x,samples at={0.3,0.6,...,2.4,3.3,3.7,...,8},only marks,mark=*,
    mark options={blue}] (\x,{2+2*sin(360*rnd)*exp(-0.25*\x)});
 \draw[densely dashed] (0,2) -- (8,2) node[right]{$a$}; 
 \draw(3,2) circle[x radius=0.4,y radius=1];
 \fill[red] (2.7,3.1)   circle[radius=2pt];
 \fill[green!70!black] (3,1.1)  circle[radius=2pt];
 \draw[green!70!black,latex-] (3,1) -- ++(0,-0.3) node[below]{$a_{N_0}$};
 \draw (3,0.1) -- (3,-0.1) node[below]{$N_0$};
 \foreach \X in {+,-}
  {\draw (3,2\X 1) -- (8,2\X 1) node[right]{$a\X\varepsilon$};}
\end{tikzpicture}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.