参见给定的代码。
\documentclass[12pt,a4paper]{article}
\usepackage[a4paper,bindingoffset=0.2in,left=0.7in,right=0.7in,top=0.7in,bottom=0.7in,footskip=.25in]{geometry}
\usepackage[centertags]{amsmath}
\usepackage{latexsym}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{newlfont}
\usepackage{enumerate}
\usepackage{makeidx}
\usepackage{tikz}
\usetikzlibrary{backgrounds,intersections}
\begin{document}
\begin{tikzpicture}
\draw[thick,latex-latex] (-2,0) -- (6,0)node[right]{$x$};
\draw[thick,latex-latex] (0,-2) -- (0,6)node[above]{$y$};
\node at (-0.3,-0.3) {O};
\foreach \x in {-1,1,2,3,4,5}{
\node[fill,circle,inner sep=1.5pt,label=below:$\x$] at (\x,0) {};
\node[fill,circle,inner sep=1.5pt,label=left:$\x$] at (0,\x) {};
}
\draw[thick,stealth-stealth, shorten >= -2cm, shorten <= -2cm,name path =b ] (0,4) -- (4,0)
node[pos=0.65,above,sloped] {$x+y=4$};
\foreach \x/\y/\name in {0/4/B,4/0/A}{
\node[fill,circle,inner sep=1.9pt,label={[inner sep=0pt]below left:\name($\x, \y$)}] at (\x,\y) {};
}
\end{tikzpicture}
\end{document}
我的问题是,
当我编译它时,我发现点 A(4 , 0) 和 B(0 , 4) 的标记与轴的标记混合在一起。我该如何将它们分开。请帮帮我。