I am using tikz to typeset a diagram in a latex document.
I have a grid of 'grid-diagrams', with each grid-diagram drawn as a separate tikz picture and then arranged into the grid as nodes.
I want to draw a circle node (which will eventually contain a label) in the bottom-right hand square of each grid-diagram.
I use exactly the same code for each grid-diagram, but the circle is drawn in a different place each time.
Am I doing something wrong, or is this a bug in tikz? In particular, is my approach of including sub-pictures allowed/standard/good practice?
See here for an image.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning}
\usepackage{verbatim}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%
\begin{document}
\begin{tikzpicture}[scale=1, node distance = .5cm]
\node (a) at (0,0) {
\begin{tikzpicture}
\draw[step=.5cm,gray,very thin] (-0.1,-1.6) grid (1.6, 0.1);
\node at (1.25, -1.25) [fill=white, shape=circle, draw=black] {};
\end{tikzpicture}
};
\node[right=of a] (b) {
\begin{tikzpicture}
\draw[step=.5cm,gray,very thin] (-0.1,-1.6) grid (1.6, 0.1);
\node at (1.25, -1.25) [fill=white, shape=circle, draw=black] {};
\end{tikzpicture}
};
\node[below=of a] (c) {
\begin{tikzpicture}
\draw[step=.5cm,gray,very thin] (-0.1,-1.6) grid (1.6, 0.1);
\node at (1.25, -1.25) [fill=white, shape=circle, draw=black] {};
\end{tikzpicture}
};
\node[right=of b] (d){
\begin{tikzpicture}
\draw[step=.5cm,gray,very thin] (-0.1,-1.6) grid (1.6, 0.1);
\node at (1.2, -1.5) [fill=white, shape=circle, draw=black] {};
\end{tikzpicture}
};
\node[below=of b] (e){
\begin{tikzpicture}
\draw[step=.5cm,gray,very thin] (-0.1,-1.6) grid (1.6, 0.1);
\node at (1.25, -1.25) [fill=white, shape=circle, draw=black] {};
\end{tikzpicture}
};
\node[below = of c] (f) {
\begin{tikzpicture}
\draw[step=.5cm,gray,very thin] (-0.1,-1.6) grid (1.6, 0.1);
\node at (1.25, -1.25) [fill=white, shape=circle, draw=black] {};
\end{tikzpicture}
};
\end{tikzpicture}
\end{document}