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!