![在 tkz-euclide 网格中的节点周围放置空白区域](https://linux22.com/image/344957/%E5%9C%A8%20tkz-euclide%20%E7%BD%91%E6%A0%BC%E4%B8%AD%E7%9A%84%E8%8A%82%E7%82%B9%E5%91%A8%E5%9B%B4%E6%94%BE%E7%BD%AE%E7%A9%BA%E7%99%BD%E5%8C%BA%E5%9F%9F.png)
我想绘制一个这样的网格,其中节点 0 和 X 如图所示,但每个节点后面的网格线都是断开的。因此 0 和 X 只是在空白处。我该怎么做?
\documentclass{article}
\usepackage{tkz-euclide}
\begin{document}
\begin{tikzpicture}[scale=3]
\draw[step=.5cm,gray,very thin] (-1.4,-1.4) grid (1.4,1.4);
\draw (-1.5,0) -- (1.5,0);
\draw (0,-1.5) -- (0,1.5);
\draw (3mm,0mm) arc (0:30:3mm);
\node at (.5,.5) {\textbf{X}};
\node at (0,0) {$0$};
\end{tikzpicture}
\end{document}
答案1
使用选项every node/.style={fill=white}
::
\documentclass{文章} \usepackage{tkz-euclide} \usepackage{xcolor}
\begin{document}
\begin{tikzpicture}[scale=3, every node/.style={fill=white}]
\draw[step=.5cm,gray,very thin] (-1.4,-1.4) grid (1.4,1.4);
\draw (-1.5,0) -- (1.5,0);
\draw (0,-1.5) -- (0,1.5);
\draw (3mm,0mm) arc (0:30:3mm);
\node at (.5,.5) {\textbf{X}};
\node at (0,0) {$0$};
\end{tikzpicture}
\end{document}