您能解释一下为什么 TikZ 会在这个 MWE 中错误地放置节点中心吗?我期望红色节点完全与黑色节点重叠,但事实并非如此。如果我删除缩放,问题就会消失。
\documentclass[tikz, border=10]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}[xscale=-100,yscale=-100]
\tikzstyle{every node}=[inner sep=0pt,outer sep=1pt,minimum size=2mm,draw=black,fill=black,circle]
\node (A) at (2,2) {};
\node at (A.center) [red] {};
\end{tikzpicture}
\end{document}
答案1
尝试这个
\documentclass[tikz, border=10]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}[xscale=-100,yscale=-100]
\tikzstyle{every node}=[inner sep=0pt,outer sep=1pt,minimum size=2mm,draw=black,fill=black,circle]
\coordinate (a) at (2,2);
\node (A) at (a) {};
\node (B) at (a) [red] {};
\end{tikzpicture}
\end{document}