I am trying to build a flow chart using TikZ. I would like the horizontal and vertical spacing to be different. Thus, I am using node distance=2.5cm and 1cm. However, the second distance (1cm) is ignored and the 2.5 cm are used for the horizontal and vertical node distances.
In addition I tried to vary the second value, but still all nodes stay 2.5cm apart.
MWE:
\documentclass[]{article}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing,shapes,arrows,positioning}
\usetikzlibrary{calc}
\usepackage[]{xcolor}
\usetikzlibrary{positioning}
\begin{document}
\definecolor{tmp}{RGB}{173, 198, 16}
\tikzstyle{block} = [rectangle, draw, fill=tmp!80,
text width=5em, text centered, minimum height=4em]
\begin{figure}
\small
\begin{tikzpicture}[node distance=2.5cm and 1cm]
\node [block] (A) {A};
\node [block,right of=A] (B) {B};
\node [block,right of=B] (C) {C};
\node [block,right of=C] (D) {D};
\node [block,right of=D] (E) {E};
\node [block,below of=E] (F) {F};
\node [block,left of=F] (G) {G};
\node [block,left of=G] (H) {H};
\node [block,below of=A] (I) {I};
\node [block,below of=I] (J) {J};
\node [block,right of=J] (K) {K};
\node [block,below of=H] (L) {L};
\node [block,below of=G] (M) {M};
\end{tikzpicture}
\end{figure}
\end{document}
I searched the internet and I believe that I am using the node distance=2.5cm and 1cm correctly. But why doesn't it work?
right= of Betc. – percusse Dec 12 '13 at 12:49<direction> ofsyntax is deprecated. See Difference between "right of=" and "right=of" in PGF/TikZ. – Qrrbrbirlbel Dec 12 '13 at 13:50