Reputation: 2150
I would like to import two png files and stich them into subplots using matplotlib. I am following this tutorial to do this. But when I save the figure with a 2x2 subplot, the resolution is very poor. Is there a better way of doing this?
Upvotes: 0
Views: 2419
Reputation: 3740
If the resolution is satisfactory before you save, try using the dpi
keyword along with matplotlib.pyplot.savefig()
(see docs page for matplotlib.pyplot.savefig). Once you have the plot generated, simply type
from matplotlib.pyplot import savefig
savefig( 'stitched.png', dpi=400 )
and hopefully this results in a satisfactory png.
Upvotes: 2