WebA standard savefig() command is: plt.savefig('plot.png', dpi=300, bbox_inches='tight') Where 'plot.png' is the name of the saved image file. Matplotlib infers the image file format ( .png, .jpg, etc) based on the extension specified in the filename.