python matplotlib常用

plt.imshow()

plt.imshow()

plt.imshow(z, cmap = plt.cm.gray_r)#其中z为绘制对象
.imshow()
Plotting numpy arrays as images

plt.cm.gray_r
Colormap

加上_r相当于颜色 reverse 。
View Code

猜你喜欢

转载自www.cnblogs.com/lianghaiming/p/12525086.html