How to save figures while specifying the saving location, extension and resolution?
1 次查看(过去 30 天)
显示 更早的评论
Hello, below is the saving section of my code which works fine. However i would like to get figures saved with a higher resolution (any other suggestions are welcome). Adding -r600 (whats the maximum), for example, after the extension doesn`t work. Can someone let me know how to go about it? thanks
FolderName = ('C:\Users\Desktop');
windowname2=strcat(stn,'- stdseasonal');
set(fig2,'Name',windowname2,'NumberTitle','off');
saveas(fig2,fullfile(FolderName,windowname2),'png');
0 个评论
采纳的回答
OCDER
2018-10-11
print(fig2, fullfile(FolderName, windowname2), '-dpng', '-r600')
Use print instead of savefig to save a figure to a specific format and resolution. Read:
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Printing and Saving 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!