I'm trying to draw a grid of nodes of specific size. In addition, I'm poking holes into this grid by trying to make the cells and in particular their inner borders white. To make this concrete, consider the following:
\documentclass[tikz]{standalone}
\usetikzlibrary{fit, matrix}
\begin{document}
\begin{tikzpicture}
\matrix [
matrix of nodes,
inner sep=0pt, % no padding around the cells
row sep=-\pgflinewidth,
column sep=-\pgflinewidth,
nodes={
rectangle, draw=black, minimum height=11mm, minimum width=11mm,
anchor=center, inner sep=0pt, outer sep=0pt
},
nodes in empty cells,
name=table
] {
& & & & \
& & |[white]| & & \
& |[white]| & |[white]| & & \
& & |[white]| & |[white]| & \
& & & & \
};
\end{tikzpicture}
\end{document}
In general, suppose we have arbitrary "islands" of white cells in the matrix; in this case, we just have one island (of size 5), meaning the white cells span a connected subgraph of the host grid, but there could be several such islands.
We want the inner borders not be drawn, but the outer borders should be left untouched. As it is, the outer borders get drawn with just their edges showing, making them look gray-ish. See below for the non-wanted output:
How can we better control how the nodes and their edges get drawn? I also see this question which might help me draw these in a nicer way: I'm doing this programmatically so it seems nice to be able to specify the island coordinates in a list-like manner.



