node distance
. When I generate help lines the spacing between the nodes is not what I expected. I have many ideas as to why this is occurring, but I'm not sure which questions to ask to get the answer I actually need.Also, in
node distance
why is the vertical, or y-axis, spacing given as an argument before the horizontal, or x-axis, spacing? My math mind is having a hard time remembering that one.Code: Select all
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
[inner sep=0.5mm,
nofill/.style={circle,draw=cyan},
filled/.style={circle, draw=cyan, fill=cyan}]
\begin{scope}[node distance=1cm and 0.1cm]
\draw[help lines,step=5mm,gray!20] (-1,1) grid (6,-2);
%Text 1
\node (t) at (0,0) {Text 1};
\node [filled, right=of t] (t1) {};
\node [filled, right=of t1] (t2) {};
\node [nofill, right=of t2] (t3) {};
\node [nofill, right=of t3] (t4) {};
\node [nofill, right=of t4] (t5) {};
%Text 2
\node [filled, below=of t1] (j1) {};
\node [left= of j1](j) {Text 2};
\node [filled, right=of j1] (j2) {};
\node [filled, right=of j2] (j3) {};
\node [nofill, right=of j3] (j4) {};
\node [nofill, right=of j4] (j5) {};
%Text 3
\node (w) at (3.5,0) {Text 3};
\node [filled, right=of w] (w1) {};
\node [filled, right=of w1] (w2) {};
\node [nofill, right=of w2] (w3) {};
\node [nofill, right=of w3] (w4) {};
\node [nofill, right=of w4] (w5) {};
%Text 4
\node [filled, below=of w1] (e1) {};
\node [left= of e1](e) {Text 4};
\node [filled, right=of e1] (e2) {};
\node [filled, right=of e2] (e3) {};
\node [nofill, right=of e3] (e4) {};
\node [nofill, right=of e4] (e5) {};
\end{scope}
\end{tikzpicture}
\end{document}
Side question: Could anyone suggest a different way to achieve what I've done? Thank you for your help.