答案1
您指的是下面这样的情况吗?
% used PGFPlots v1.15
\documentclass[border=5pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{
compat=1.11,
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xmin=0, xmax=8,
ymin=0, ymax=8,
xlabel={$x$},
ylabel={$y$},
axis lines=center,
xtick={1,2},
ytick={1,2},
]
\addplot [color=red,mark=*] coordinates {(2,2)};
\draw [dashed,help lines] (0,2) -| (2,0);
\end{axis}
\end{tikzpicture}
\end{document}