2

I'm trying to do something similar to this epsilon-delta graph I've found. Specifically, I'd like to copy the placements and arrows, like the L+e and L-e coming out of L. Same thing with the x0 + d and x0-d coming out of the x0. Can someone help me with this? This is what I have so far. enter image description here

\begin{tikzpicture}
\begin{axis}[
,
        legend pos=north east,
        axis x line=middle,
        axis y line=middle,
        x tick label style={/pgf/number format/fixed,
                            /pgf/number format/fixed zerofill,
                            /pgf/number format/precision=1},
        y tick label style={/pgf/number format/fixed,
                            /pgf/number format/fixed zerofill,
                            /pgf/number format/precision=1},
        grid = major,
        width=8cm,  
        height=6cm,
        grid style={dashed, gray!30},
        xmin=0   ,     % start the diagram at this x-coordinate
        xmax= 4,    % end   the diagram at this x-coordinate
        ymin= 0,     % start the diagram at this y-coordinate
        ymax= 11,   % end   the diagram at this y-coordinate
%axis background/.style={fill=white},
        xlabel=$x$,
        ylabel=$f(x)$,
        tick align=outside,
        enlargelimits=false]
% plot the stirling-formulae
%\addplot[domain=0:200, red, ultra thick,samples=100] {K/(1 +    ((K-X0)/X0) * exp(r*x))    };
\addplot[domain=0:200, red, ultra thick,samples=100] {3*x-1 };

\addplot[line width=1pt, dashed, mark=none, black] coordinates {(0,8) (3,8)};
\addplot[line width=1pt, dashed, mark=none, black] coordinates {(3,0) (3,8)};
\addplot[line width=1pt, dashed, mark=none, blue] coordinates {(3.33,0) (3.333,9)};
\addplot[line width=1pt, dashed, mark=none, blue] coordinates {(2.666,7) (2.666,0)};
\addplot[line width=1pt, dashed, mark=none, blue] coordinates {(2.666,7) (0,7)};
\addplot[line width=1pt, solid, mark=none, blue] coordinates {(3.333,9) (0,9)};
\addplot[holdot] coordinates{(60,8.66)};

% 1\addlegendentry{$f(x) = 10 \sin (x)$}

\end{axis}


\end{tikzpicture}

which givesenter image description here

  • 1
    no, I'm using the same account. I made a similar post a couple days ago before I really worked on it. Now I've worked on it and I'm genuinely stuck. – JaP Apr 20 at 1:49
2

Maybe pgfplots is a bit of an overkill for a cartoon.

\documentclass[tikz,border=3.14mm]{standalone}
\begin{document}
\begin{tikzpicture}[holdot/.style={circle,draw,fill=white,inner sep=1pt}]
 \draw[line width=4mm,blue!30] (3,0)--(3,4);
 \draw[very thick,red!80!pink,dashed] (2.8,0) -- (2.8,4);
 \draw[double distance=4mm,very thick,double=orange,red!80!pink] (0,4) -- (5,4);
 \draw[very thick,red!80!pink,dashed] (3.2,0) -- (3.2,4.2);
 \draw[thick,-latex] (-2,0) -- (6,0);
 \draw[thick,-latex] (0,-1) -- (0,6);
 \draw[very thick,blue!50!cyan] (-0.8,0.2) -- (3.5,4.5) to[out=45,in=135] 
 node[pos=0.5,above,font=\large]{$y=f(x)$} (5,4.5);
 \draw[very thick,dashed] (0,4) node[left] (L) {$L$} -| (3,0) node[below] (x0) {$x_0$};
 \draw[very thick,blue!50!cyan,fill=white] (3,4) circle[radius=2pt];
 \draw (L) -- ++(120:0.7) node[above] {$L+\varepsilon$}
 (L) -- ++(-120:0.7) node[below] {$L-\varepsilon$}
 (x0) -- ++(-45:0.7) node[below right] {$x_0+\delta$}
 (x0) -- ++(-135:0.7) node[below left] {$x_0-\delta$};
\end{tikzpicture}
\end{document}

enter image description here

  • 1
    +1 for the pureness – user156344 Apr 20 at 2:10
  • @JouleV Or poorness? ;-) – user121799 Apr 20 at 2:11
  • If it was 'poorness' the plus sign would be a minus sign :) – user156344 Apr 20 at 2:12
  • @JouleV It is almost Easter and I once learned one should give to the poor... ;-) – user121799 Apr 20 at 2:13
  • 1
    @JouleV I leave the downvote business to others. The only ones which I sometimes feel I want to downvote are the ones who "steal" from others, but then I remind myself that what they want most is attention, and by not downvoting them I deny them this attention.... ;-) – user121799 Apr 20 at 2:17

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.