I am trying to save a plot into a file using plt.savefig, however I am dissatisfied with the output picture quality. Changing dpi option doesn't help.
plt.savefig('filename.png', dpi=1200, format='png', bbox_inches='tight')
I tried saving to 'svg' and 'eps' - makes no difference. I wonder if the problem is with something else, like version of some library or OS or something alike. It also looks like the problem is not with resolution but the way lines and symbols are drawn - too bold.
plt.show() shows significantly better picture, and I can save it to png with satisfying quality - and surprisingly file size is about 8 times smaller (because of compressing, I suppose, which is fine.)
100
. Usingdpi=100
should give you the same result as for showing. It is hence not clear what you mean by "Changing dpi option doesn't help." The output when usingdpi=1200
is expected - there is no problem with that. – ImportanceOfBeingErnestdpi=100
and explain what you don't like about that. – ImportanceOfBeingErnest