import numpy as np yong_grid = [[0,0,0,0,1,1,0,0,0,0], [0,0,1,1,1,1,0,0,1,0], [0,0,0,0,0,1,0,1,0,0], [0,0,0,0,0,1,1,0,0,0], [0,1,1,1,1,1,1,0,0,0], [0,0,0,1,0,1,1,0,0,0], [0,0,1,0,0,1,0,1,0,0], [0,1,0,0,0,1,0,0,1,0], [0,0,0,1,0,1,0,0,0,0], [0,0,0,0,1,1,0,0,0,0]] print(np.matrix(yong_grid)) from matplotlib import pyplot as plt im = plt.imshow(yong_grid, cmap="copper_r") plt.show()