0

I have a node x and another one y I want to put 2cm above and 3cm right of x. Right now when I face this situation I proceed in two steps by declaring a dummy empty node:

\node (x) {x};
\node[above of=x,node distance=2cm] (dummy) {};
\node[right of=dummy,node distance=3cm] (y) {y};

This works but it is tedious and rather clumsy. Is there a cleaner way to do that?

2
  • 1
    \node[above right=2cm and 3cm of x] (y) {$y$};
    – js bibra
    Mar 9 '21 at 13:58
  • 1
    works like a charm. many thanks
    – qouify
    Mar 9 '21 at 14:03
1

enter image description here

\documentclass[border=5mm,tikz]{standalone}

\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}


\node[circle, draw=black] (x) {$x$};

\node[circle, draw=black, above right=2cm and 3cm of x] (z) {$z$};


\end{tikzpicture}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.