matplotlib画图相关

一. plt显示一副图像

1. import matplotlib.pyplot as plt

2. plt.figure()                    # 图像名称

3. plt.imshow(picture)      # "picture"为你想要显示的图像

4. plt.show()                    # 即可显示图像

 

二. plt显示多副图像

1. import matplotlib.pyplot as plt

2. plt.figure()

3. plt.subplot(1,2,1)

4. plt.imshow(images1)

5. plt.subplot(1,2,2)

6. plt.imshow(images2)

7. plt.show()

 

posted @ 2019-10-08 09:50  重大的小鸿  阅读(129)  评论(0编辑  收藏  举报