import numpy as np
import PIL.Image as Image
from matplotlib import pyplot as plt
from matplotlib import cm as CM

ax = plt.subplot(121)
k = np.random.randn(256,256)
plt.imshow(k,cmap=CM.jet)
plt.axis('off')  #去掉坐标轴
k1 = np.random.randn(256,256)
ax = plt.subplot(122)
plt.imshow(k1,cmap=CM.jet)
plt.axis('off')  #去掉坐标轴
plt.savefig('test.png') #保存图片