1. import matplotlib.pyplot as plt
    2. import matplotlib.image as mpimg
    3. from matplotlib import rcParams
    4. %matplotlib inline
    5. # figure size in inches optional
    6. rcParams['figure.figsize'] = 11 ,8
    7. # read images
    8. img_A = mpimg.imread('\path\to\img_A.png')
    9. img_B = mpimg.imread('\path\to\img_B.png')
    10. # display images
    11. fig, ax = plt.subplots(1,2)
    12. ax[0].imshow(img_A);
    13. ax[1].imshow(img_B);

    https://www.it1352.com/2142692.html