答案1
以下是他可以用 tikz 做的事情,你可以用它来调整自己的功能
\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}