
Ich verstehe etwas nicht ganz über Koordinaten, aber ich bin ziemlich sicher, dass Sie es erklären können
Dies ist ein Beispiel für das Problem
\documentclass[tikz, border = 3pt]{standalone}
\usepackage{tikzpagenodes}
\begin{document}
\begin{tikzpicture}
\coordinate (A) at (0, 0);
\coordinate (B) at (4, 4);
\draw (A) rectangle (B);
\fill[red, xshift = 20pt] (B) circle (0.3) node[above = 7pt]{doesn't work};
\fill[blue, xshift = 20pt] (0, 0) circle (0.3) node[below = 7pt]{works};
\end{tikzpicture}
\end{document}
shift
Das Problem ist, wenn ich versuche , mit einer zuvor definierten Koordinate zu verwenden , zB
\fill[red, xshift = 20pt] (B) circle (0.3);
Wie auf dem Bild zu sehen, verschiebt es den Kreis offensichtlich nicht. Warum ist das so?
Vielen Dank im Voraus
Antwort1
Es würde mit der dem Buchstaben zugewiesenen Koordinate funktionieren, wenn Sie die Umschaltoption neben dem Koordinatenbuchstaben anwenden, \fill[red] ([xshift=20pt]B) circle (0.3) node[above = 7pt]{doesn't work};
jedoch nicht für den Pfad.
\documentclass[tikz, border = 3pt]{standalone}
\usepackage{tikzpagenodes}
\begin{document}
\begin{tikzpicture}
\coordinate (A) at (0, 0);
\coordinate (B) at (4, 4);
\draw (A) rectangle (B);
\fill[red] ([xshift=20pt]B) circle (0.3) node[above = 7pt]{doesn't work};
\fill[blue, xshift = 20pt] (0, 0) circle (0.3) node[below = 7pt]{works};
\end{tikzpicture}
\end{document}