MWE from another question here:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix, backgrounds}
\begin{document}
\centering
\begin{tikzpicture}[%
block/.style={draw, text width=5em, text centered, rounded corners, minimum height=2em},
entity/.style={draw, text centerd}
]
\begin{scope}
\matrix (A) [matrix of nodes, inner sep=1em, row sep= 2em, column sep= 2em, nodes={block}] {
& A & \\
B & & C\\
& D & \\
E & & \\
};
\end{scope}
\path (A.north) -- coordinate[pos=.25] (aux1) coordinate[pos=.75] (aux2) (A.south);
\begin{scope}[on background layer]
\draw[fill=green!30] (A.north west) rectangle (aux1-|A.east);
\draw[fill=red!30] (A.west|-aux1) rectangle (A.east);
\draw[fill=blue!30] (A.west) rectangle (aux2-|A.east);
\draw[fill=orange!30] (A.west|-aux2) rectangle (A.south east);
\end{scope}
\end{tikzpicture}
\end{document}
Is it possible to add nodes that:
- can span a whole column of the matrix without making their row oversized
- and also be covered by the colored bands?
