December 20, 2019
Figures
We can use plt.close(‘all’) to clear all existing plots before plotting a new one.
We can use the command plt.figure() to create new figures and size them how we want.
We can add the keyword figsize=(width, height) to set the size of the figure in inches.
We can save a figure by using the command plt.savefig() in many different formats, such as png, svg, and pdf.