import matplotlib.pyplot as plt
import numpy as np

m=10
#szachownica=[[0 for i in range(m)] for j in range(m)]
#matrix=np.array(szachownica)
#data = matrix
data = np.random.random((m, m))

fig, ax = plt.subplots()
# Using matshow here just because it sets the ticks up nicely. imshow is faster.
ax.matshow(data, cmap='seismic')

for (i, j), z in np.ndenumerate(data):
    ax.text(j, i, '{:0.1f}'.format(z), ha='center', va='center')

plt.show()

f04d2ac3b1ca7abd72f961f5ee6ba2870359c937
<mask token>

<mask token>
ax.matshow(data, cmap='seismic')
for (i, j), z in np.ndenumerate(data):
    ax.text(j, i, '{:0.1f}'.format(z), ha='center', va='center')
plt.show()

<mask token>
m = 10
data = np.random.random((m, m))
fig, ax = plt.subplots()
ax.matshow(data, cmap='seismic')
for (i, j), z in np.ndenumerate(data):
    ax.text(j, i, '{:0.1f}'.format(z), ha='center', va='center')
plt.show()

import matplotlib.pyplot as plt
import numpy as np
m = 10
data = np.random.random((m, m))
fig, ax = plt.subplots()
ax.matshow(data, cmap='seismic')
for (i, j), z in np.ndenumerate(data):
    ax.text(j, i, '{:0.1f}'.format(z), ha='center', va='center')
plt.show()

import matplotlib.pyplot as plt
import numpy as np

m=10
#szachownica=[[0 for i in range(m)] for j in range(m)]
#matrix=np.array(szachownica)
#data = matrix
data = np.random.random((m, m))

fig, ax = plt.subplots()
# Using matshow here just because it sets the ticks up nicely. imshow is faster.
ax.matshow(data, cmap='seismic')

for (i, j), z in np.ndenumerate(data):
    ax.text(j, i, '{:0.1f}'.format(z), ha='center', va='center')

plt.show()
