I am learning tikz and I wish to use it to draw two rows of fixed size boxes each with a printable character in them to display data. I have tried to do this in the attached example, but I cannot figure out how to get the text boxes to be the same size.
Can someone point out how I can get the text boxes to all render the same size? Also how can I get the label strings to be at the correct vertical height to match the rows.
\documentclass{report}
\usepackage{tikz}
\begin{document}
text before
\begin{figure}
\begin{tikzpicture}
\tikzset{red/.style={rectangle, draw,fill=red, font=\ttfamily, minimum width =10pt, minimum height=10pt}}
\tikzset{grn/.style={rectangle, draw, fill=green, font=\ttfamily, minimum width =10pt, minimum height=10pt}}
\tikzset{blk/.style={font=\ttfamily, minimum width =10pt, minimum height=10pt}}
% Row 1 AbCDE
\node[blk] (L1) {Row 1 Label};
\node[red] (r1) at ([xshift=1cm] L1.east) {A};
\node[grn, anchor=west] (r2) at (r1.east){b};
\node[red, anchor=west] (r3) at (r2.east){c};
\node[grn, anchor=west] (r4) at (r3.east){D};
\node[red, anchor=west] (r5) at (r4.east){E};
% Row 2 aB.De
\node[blk] at (L1.south) {Row 2 Label};
\node[red, anchor=north] at (r1.south){a};
\node[grn, anchor=north] at (r2.south){B};
\node[red, anchor=north] at (r3.south){.};
\node[grn, anchor=north] at (r4.south){D};
\node[red, anchor=north] at (r5.south){e};
\end{tikzpicture}
\end{figure}
text after
\end{document}
anchor=north
in the definition of Row 2 Label. By default, TikZ is placing the centre of the box containing 'Row 2 Label' at the south of Row 1 label. – David R Sep 30 '15 at 12:25