Issue
I can't find the way to change the default DPI of the file that I save using the matplotlib GUI for displaying the plot:
When I save the figure using the icon the DPI are set by default. Usually, I use: import matplotlib.pyplot as plt
plt.savefig(figurename,dpi=1000)
And I got the expected output, but I can't obtain the same output saving the figure from the GUI.
Solution
If you are using matplotlib
2.x, then you can specify the DPI of the figure when creating the figure and that DPI will be used when saving the file via the UI; however, this will also be the DPI which it is rendered at on the screen.
fig = plt.figure(dpi=1000, figsize=(4,4))
Otherwise, you can set the default DPI for savefig
in your rcParams
mpl.rcParams['savefig.dpi'] = 1000
Answered By - Suever
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.