matplotlib save from figure object code example Example: save matplotlib figure plt.savefig('image.png')