7

I'm using the trying to use the tikzpicture package to place blockB below and to the left of blockA. I also want to specify both the horizontal and vertical distance between the two blocks.

\node [block, below left of=blockA, node distance=2.5cm] (blockB) {block B text}; 

The node distance parameter seems to set both the horizontal and vertical distance simultaneously. Is there any way I can decouple them?

1
  • 1
    Is this what you are looking for:\node [block] at ([shift={(<xhift>,<yshift>)}]blockA) (blockB) {block B text}; where <xhift> and <yshift> is the x and y distance? Commented Feb 9, 2017 at 11:10

1 Answer 1

9

Use the below left = <specify below> and <specify left> of <specify node> syntax. This requires loading the positioning library.

\documentclass[border=2pt,tikz]{standalone}
\usetikzlibrary{positioning}
\begin{document}

\begin{tikzpicture}
\node [draw] (blockA) {block A text};
\node [draw, below left = 3cm and 1cm of blockA] (blockB) {block B text};
\end{tikzpicture}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .