from matplotlib import pyplot as plt # As png plt.savefig('Path/FigureName.png') # As pdf plt.savefig('Path/FigureName.pdf')