I would like to save a figure to png format exactly the same as seen on the screen. I searched the web and found:
set(gcf,'PaperPositionMode','auto'); saveas(gcf,[Filename '.png']);
that supposed to save the figure the same size, but it actually changed the size from 1200x600 to 1875x938, huh?
I also tried setting ‘PaperPosition’ and got the same size 1200x600, but the fonts in the saved figure became much larger compared to on screen and covered up parts of the graph.
If I use the "save" button in the figure window then it saves the figure as seen on the screen without a problem, but I would like to be able to do it programmatically if possible.
Please help. Thanks!
It's the same ratio at least. You may want to look at using export_fig() which you can download from the file exchange. This will preserve the figure size.