2

Is possible to do these lines in Tikz ? How ?

    \documentclass{article}
\begin{document}
\usepackage{tikz}
        \begin{tikzpicture}
    \draw[->]  (0,0) -- (8,0) node[anchor=north] {$n$};
    \draw[->]  (0,0) -- (0,5);
    \end{tikzpicture}.
\end{document}

enter image description here

cfr
  • 198,882
Micky
  • 125
  • 5
    There are no asymptotes in that picture, but the answer is 'yes'. Do you have specific functions you want to plot? If you can do any part of that picture with TikZ already, please add the code to your question (as a complete, compilable document, not just the tikzpicture environment -- include documentclass, the required packages and libraries, etc.) – Torbjørn T. Dec 09 '15 at 20:45
  • There was a good discussion of this type of drawing in this question about somewhat random functions. – Thruston Dec 09 '15 at 22:37
  • This question has been edited in a way which makes nonsense of the existing answer. I've rolled back to the last relevant version. Please do not edit questions in a way which undermines the relevance of existing answers when those answers have addressed the original question. If necessary, ask a new question. You can link to this one for reference if relevant. – cfr Dec 10 '15 at 00:45
  • Incidentally I have no idea what you are currently asking. – cfr Dec 10 '15 at 00:46

1 Answers1

5

here is what he can do with tikz, to you to adapt with your functions

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc, positioning,fit,intersections}
\begin{document}
\begin{tikzpicture}
    \draw[->]  (0,0)coordinate(O) -- (8,0) node[anchor=north] {$n$};
    \draw[->]  (0,0) -- (0,5);

\draw[domain=0:8,smooth,variable=\x,blue,name path=c1] plot ({\x},{0.5*\x+2*sin(\x r)+1})node[right]{$f_1(n)$};
\draw[domain=0:8,smooth,variable=\x,red,name path=c2] plot ({\x},{0.2*\x+0.5*sin(\x r)+2})node[right,black]{$f_2(n)$};
\fill[red,name intersections={of=c1 and c2}]
    (intersection-1) circle (2pt)
    (intersection-2) circle (2pt)
        (intersection-3) circle (2pt) ;

\draw[dashed] (intersection-2) -- (intersection-2|-O) node[below]{n};
\end{tikzpicture}

\end{document}

enter image description here

rpapa
  • 12,350
  • \draw[dashed] (intersection-2) -- (intersection-2|-O) What is (intersection-2|-O) – Micky Dec 09 '15 at 21:34
  • @Micky (intersection-2 | -O) it allows to obtain the intersection point (intersection-2) and the point (O) by two lines perpendicular to the first being vertical | and the horizontal second -

    reversing the symbol (intersection-2 -| O) is obtained point on the vertical axis

    – rpapa Dec 09 '15 at 21:46