答案1
尝试这个:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[thin,-latex] (-.1,0)--(6.6,0) node[right] () {$x$};
\draw[thin,-latex] (0,-1)--(0,3) node[above] () {$y$};
\draw[blue,line width=2pt] plot [domain=0.5:4.5,smooth] (\x,{.02*exp(\x)+.3});
\node[blue] at (5.5,2) () {\large $y=f(x)$};
\draw[red,dashed] (3,0) node[below] {$a-\delta$}--(3,{.02*exp(3)+.3})--(0,{.02*exp(3)+.3}) node[left] {$ l-\epsilon $};
\draw[red,dotted] (3.5,0) node[above, fill=white] {$ a $}--(3.5,{.02*exp(3.5)+.3})--(0,{.02*exp(3.5)+.3}) node[left] {$l$};
\draw[red,dashed] (4,0) node[below] {$ a+\delta $}--(4,{.02*exp(4)+.3})--(0,{.02*exp(4)+.3}) node[left] {$ l+\epsilon $};
\end{tikzpicture}
\end{document}
输出:
注意:我不喜欢双箭头轴。如果你想用-latex
替换latex-latex
。
编辑:如果你更喜欢这个图表
您必须通过这种方式更改代码的三行:
\draw[red,dashed] (3,-.5) node[below] {\small $a-\delta$}--(3,{.02*exp(3)+.3})--(0,{.02*exp(3)+.3}) node[left] {\small$ l-\epsilon $};
\draw[red,dotted] (3.5,0) node[below] {\small $ a $}--(3.5,{.02*exp(3.5)+.3})--(0,{.02*exp(3.5)+.3}) node[left] {\small $l$};
\draw[red,dashed] (4,-.5) node[below] {\small $a+\delta $}--(4,{.02*exp(4)+.3})--(0,{.02*exp(4)+.3}) node[left] {\small$l+\epsilon $};