export high resolution .png matplotlib 1

export high resolution .png matplotlib

plt.savefig('filename.png', dpi=300)

Here is what the above code is Doing:
1. We’re creating a figure object called fig, and an axis object in that figure called ax.
2. We’re plotting (x,y) on that axes, and saving it.
3. We’re setting the axes labels, and the figure title.
4. We’re saving the figure.

Similar Posts