我想打印均匀收敛的几何解释,但我不知道如何开始,希望你能帮助我。绘图的想法是为了说明均匀收敛的几何意义。
看起来像这张图片(见下文):
谢谢。 致谢: https://github.com/JuanEspejo/Analisis-Real/blob/master/series.pdf
我的尝试
\documentclass[tikz,border=2mm]{standalone}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\draw[help lines, color=gray!30, dashed] (-1,-1) grid (5,5);
\draw[->,ultra thick] (-1,0)--(5,0) node[right]{$x$};
\draw[->,ultra thick] (0,-1)--(0,5) node[above]{$y$};
\node (source) {};
\node[below right= -3cm and 4cm of source] (destn) {$\bigg\}\varepsilon$};
\node[below right= -4cm and 4cm of source] (destn) {$\bigg\}\varepsilon$};
\node[below right= 0cm and 2cm of source] (destn) {$X$};
\node[below right= -3cm and 0cm of source] (destn) {$f$};
\node[below right= -4cm and 0cm of source] (destn) {$f_n$};
\draw (1,3) -- (1,4);
\draw (4,3) -- (4,4);
\draw[red] (1,4) arc (120:-10:3);
\draw[blue] (1,3.5) arc (120:-10:3);
\draw[red] (1,3) arc (120:-10:3);
\end{tikzpicture}
\end{document}
答案1
像这样?
\documentclass[tikz, border=2mm]{standalone}
\usetikzlibrary{decorations.pathreplacing,
positioning,
quotes}
\begin{document}
\begin{tikzpicture}[auto,
B/.style = {decorate,
decoration={brace, amplitude=3pt,
pre=moveto,pre length=1pt,post=moveto,post length=1pt,
raise=1mm}},
domain = -30:30, samples=10, smooth,
font = \footnotesize
]
% coordinates
\draw[->] (-0.2,0) -- (6,0) node[right]{$x$};
\draw[->] (0,-0.4) -- (0,4) node[above]{$y$};
% curve
\draw[very thick]
plot ({(45+\x)/15},{1+rand/5+2*cos(\x)})
node[coordinate,pin=0:$f_n$] {};
% convergence borders
\draw[red] plot ({(45+\x)/15},{1.5+2*cos(\x)}) coordinate (e1);
\draw[blue] plot ({(45+\x)/15},{1.0+2*cos(\x)}) coordinate (e2);
\draw[red] plot ({(45+\x)/15},{0.5+2*cos(\x)}) coordinate (e3);
% labels on the left side
\draw[B] (1,{1.25+cos(-10)}) -- node[left=1.5mm] {$f$} ++ (0,1);
% labels on the right
\draw[B] (e1) -- node[right=1.5mm] {$\varepsilon$} (e2);
\draw[B] (e2) -- node[right=1.5mm] {$\varepsilon$} (e3);
% domain
\draw[dashed] (1,{0.5+2*cos(30)}) -- (1,0)
(5,{0.5+2*cos(30)}) -- (5,0);
\draw[very thick] (1,0) to ["$X$" '] (5,0);
\end{tikzpicture}
\end{document}
答案2
你想要这样的东西吗?我不确定你到底想做什么。(通常看起来像这样的东西要么使用 Ti钾Z 或pgfplots
.)
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning,decorations.pathreplacing}
\begin{document}
\begin{tikzpicture}
\draw[help lines, color=gray!30, dashed] (-1,-1) grid (5,5);
\draw[->,ultra thick] (-1,0)--(5,0) node[right]{$x$};
\draw[->,ultra thick] (0,-1)--(0,5) node[above]{$y$};
\coordinate (source) at (0,0);
\node [below right= 0cm and 2cm of source] {$X$};
\draw (1,3) -- (1,4);
\draw (4,3) -- (4,4);
\foreach \i/\j [count=\n] in {(1,4)/red,(1,3.5)/blue,(1,3)/red}
\draw [\j] \i coordinate (a\n) arc (120:60:3) coordinate (b\n);
\foreach \j [count=\i, evaluate=\i as \s using {(\i+1)*2.5}, evaluate=\i as \k using {int(\i+1)}] in {f,f_n}
{
\draw [decorate, decoration=brace] (b\i) ++ (\s pt,0) coordinate (c\i) -- (c\i |- b\k) node (e\i) [midway, xshift=2.5pt, right] {$\varepsilon$};
\node [left=2.5pt of a\i |- e\i] {$\j$};
}
\end{tikzpicture}
\end{document}