method 1 import numpy as np import matplotlib.pyplot as plt fg, axes = plt.subplots(1, 2, figsize=(16, 8)) ax1, ax2 = axes # 或者上两步直接合并成fg, (ax1, ax2) = plt.subplots(1, 1, figsize=(16, 8)) ax1.imshow(np.random.randint(0, 256, size=(100, 100), dtype=np…