import matplotlib.pyplot as plt plt.subplot(1, 2, 1) ax = plt.gca() ax.plot([1, 2, 3], [0, 0.5, 0.2]) plt.subplot(1, 2, 2) ax = plt.gca() ax.plot([3, 2, 1], [0, 0.5, 0.2])