← How-To Guides How-To How to create a plot with Matplotlib Use plt.plot(x, y), then plt.show(). Use plt.figure() and ax for more control. Basic plot pyplot is stateful. import matplotlib.pyplot as plt plt.plot([1,2,3], [1,4,9]) plt.show()