You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
500 B
Python

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()