Learn R Programming

CellularAutomaton (version 1.1-1)

plot: Plot a One-Dimensional Cellular Automaton

Description

This method plots an instance of class CellularAutomaton.

Arguments

col
a vector of colors

Details

This method uses image() to plot the automaton. The plot displays the automaton's steps in increasing order from top to bottom. The user may specify a vector of colors to be used by the plot. The default is 0:(k - 1), where k is the number of colors for the automaton.

ca$plot() ca$plot(col = c(3, 1, 4))