https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.subplots.html

import matplotlib.pyplot as plt
plt.subplots(행, 열)
import matplotlib.pyplot as plt
plt.subplot(1,2, 1)
plt.plot([2, 3], [5, 6], label = '1')
plt.legend()
plt.subplot(1,2, 2)
plt.plot([1,3], [3, 5], label = '2')
plt.legend()
plt.show()

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/f07b746e-8800-444e-8428-54d7a43d67e5/Untitled.png