Mittwoch, 15. Juli 2015

shift in nodes in tikz

for a shift in one direction use the option:

yshift=LENGTH
xshift=LENGTH

for a shift in both directions use:

shift=({XSHIFT,YSHIFT})

Example:

\documentclass{article}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
\draw [help lines] (0,0) grid (4,4);
\node (A) at (2,1) {A};
\path ([yshift=2cm]A) node {B};
\node (C) at ([yshift=1cm]A) {C};
\node (D) at ([shift=({1cm,1cm})]A) {D};
\end{tikzpicture}

\end{document}

Keine Kommentare:

Kommentar veröffentlichen