I want to produce the following ArrayPlot programmatically:
To produce the leftmost grid, I tried this:
GridBox[{
{ArrayPlot[{{0, 1, 0}}]},
{ArrayPlot[{{1, 1, 1}}]},
{ArrayPlot[{{0, 0, 0}}]}},
GridBoxDividers -> {"Rows" -> {{True}},
"Columns" -> {{True}}}] // DisplayForm
I'm unsure if this can be tailored to look like I want, or if I should pursue another solution.
edit: the general formula for the plots is an ellementary cellular automaton that inverts its output if the state of its cell is 1 (black) in t-1 (the upper square). The CellularAutomaton
function can serve as guide.
ArrayPlot[{{0, 1, 0}, {1, 1, 1}, {0, 1, 0}}]
. Now just hand-code the 3x3 matrices for each of these, mapArrayPlot
and wrap inRow
and you should be pretty close to done (except for some minor tweaks). This will be far easier and faster than trying to come up with a clever algorithmic/programmatic way to generate those images. $\endgroup$