
以下代码: import matplotlib.pyplot as pltimport numpy as npdata = np.random.randint(0, 100, size=(10, 10))plt.imshow(data, cmap=jet, interpolation=nearest)plt.show() 给出下图: 但是,我想手动定义它们,而不是与数组中的索引对
以下代码: import matplotlib.pyplot as pltimport numpy as npdata = np.random.randint(0, 100, size=(10, 10))plt.imshow(data, cmap=jet, interpolation=nearest)plt.show() 给出下图: 但是,我想手动定义它们,而不是与数组中的索引对