필터 지우기
필터 지우기

how to save figures without margin?

조회 수: 17 (최근 30일)
Jack Xiao
Jack Xiao 2019년 5월 11일
댓글: Nick Tsui 2022년 11월 17일
as the title, I need to save the figures or images shown in the figure with the same size of the image.
but there are always margins as shown in the following: (the size is 604x593)
捕获asda.PNG
the orginal image is : (the size is 500x430)
ILSVRC2012_val_00000224.JPEG
how to save figures without margin?

채택된 답변

Valeriy
Valeriy 2020년 2월 23일
Try:
axis off; % If you have axis titles, labels, etc.
set (gca,'Position',[0 0 1 1]);
print(gcf,'Test.jpg', '-djpeg', '-r300');
  댓글 수: 2
Maximiliano Barbosa
Maximiliano Barbosa 2022년 2월 18일
Thank you
Nick Tsui
Nick Tsui 2022년 11월 17일
There are still some margins on both left and right sides of the image.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by