为什么不使用此代码来运行(TikZ)节点?

为什么不使用此代码来运行(TikZ)节点?

我有这段代码,我想在点附近添加节点。但文本始终位于 0,0 点。

    \documentclass[10pt,a4paper]{article}
    \usepackage{tikz}
    \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
    

    \begin{document}


    \begin{tikzpicture}
    
    \coordinate (A) at (0,0) node {A};
    \coordinate (B) at (7,0) node {B};
    \coordinate (C) at (7,3) node {C};
    \coordinate (D) at (0,3) node {D};
    \coordinate (E) at (0,4) node {E};
    \coordinate (F) at (7,4) node {F};
    \coordinate (G) at (7,7) node {G};
    \coordinate (H) at (0,7) node {H};
    \coordinate (I) at (1.5,5.5);
    \coordinate (J) at (1.5,1.5);
    
    \draw [thick, blue, dotted, fill=green!20] (A) rectangle (C);
    \draw (E) rectangle (G);
    \draw [thin, red, dotted, fill=blue!20] (J) circle (1.2);
    \draw (I) circle (1.2);
    
    \end{tikzpicture}
\end{document}

结果如下:

结果

感谢您的回复!

相关内容