答案1
您的问题的答案带轴的绘图图应该可以引导您从 PGFplots、Metapost 和 pstricks 中找到解决方案的起点。这是 Tikz 版本。
顺便说一句,您的功能和情节有 2 个因子的差异。
\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}[x=3mm,y=1mm]
\draw[thin,gray!40,xstep=2,ystep=5] (6,5) grid (50,100);
\draw(5,0) -- (5,100) -- ++(0.5,0)node[anchor=south west]{$P(M_{2n})$};
\foreach \y in {5,10,...,95}{
\draw(5,\y)--+(0.5,0)node[right=-2pt]{\footnotesize\textsf{\y}};
}
\draw(5,0) -- (50,0) node[anchor=north west]{$n$} -- ++(0,1.5);
\foreach \x in {6,8,...,48}{
\draw(\x,0)--+(0,1.5)node[above=-2pt]{\footnotesize\textsf{\x}};
}
\begin{scope}
\clip(5,0) rectangle (50,100);
\draw[blue,thick] (5,2*5-1) -- node[pos=.7,below,sloped,black]{$2x-1$} (50,2*50-1);
\draw[red,thick] (5,2.2361*5-2.2361) -- node[pos=0.7,sloped,above,black]{$\sqrt{5}(x-1)$} (50, 2.2361*50-2.2361);
\end{scope}
\end{tikzpicture}
\end{document}