Is there any way to make Mathematica visualize a multistate square lattice? That is, I have a data set from a simulation that is x coloumns wide and y rows tall (just a simple .dat file), where each cell has a value *n_i = 0,1,2,3* - and I then want Mathematica to draw a x by y square lattice and color each square in the lattice corresponding to the state in the data set, e.g. 0 = red, 1 = green, 2 = blue, 3 = yellow.
You can use
Make some data and save in .DAT file:
Now import that file and plot:
From here, we could do either of
to give this: