As you can see from the following figure, only the cells with the text are raised slightly than the empty cells.
I want all the cells in the same level. How can I do that? Below is my working code:
\begin{tikzpicture}
[array/.style={matrix of nodes,
nodes={draw, minimum size=10mm, minimum width=15mm, fill=gray!10},
column sep=-\pgflinewidth,
row sep=0.5mm,
nodes in empty cells,
row 1 column 1/.style={nodes={draw=none}},
row 2 column 1/.style={nodes={draw=none, fill=none}},
row 2 column 2/.style={nodes={draw=none, fill=none}},
row 2 column 8/.style={nodes={draw=none, fill=none}},
row 2 column 9/.style={nodes={draw=none, fill=none}},
row 5 column 4/.style={nodes={draw=none, fill=none}},
row 5 column 5/.style={nodes={draw=none, fill=none}},
row 5 column 6/.style={nodes={draw=none, fill=none}},
row 1/.style={nodes={font=\ttfamily, draw=none, fill=none, minimum size=5mm}},
row 3/.style={nodes={font=\ttfamily, draw=none, fill=none, minimum size=5mm}},
row 4/.style={nodes={font=\ttfamily, draw=none, fill=none, minimum size=5mm}},
}]
\matrix[array] (array)
{
& & & & dhaka & & & & \\
& & & & 19 & & & & \\
& & & 20021 & 20022 & 20023 & & & \\
& sylhet & & & & & & khulna & \\
& 19 & & & & & & 20022 & \\
};
\draw [-{Latex[length=3mm]}] (array-2-5.south)--(array-5-8.north) node [midway, above, sloped] (TextNode) {\hspace{1.5cm} \&};
\draw [-{Latex[length=3mm]}] (array-2-5.south)--(array-5-2.north);
\end{tikzpicture}
minimum size
key that you defined on rows 1, 3 and 4. Have you tried to comment it?minimum size
.anchor=north
in the definition of nodes