How can I save only content of matlab figure ?

조회 수: 10 (최근 30일)
K M Ibrahim Khalilullah
K M Ibrahim Khalilullah 2017년 2월 8일
답변: James Tursa 2017년 2월 9일
i am using the following code: fig=figure,imshow(RIm); saveas(fig,'22.jpg');
It saves as image but with white border. How can I save only content of the figure.

답변 (2개)

KSSV
KSSV 2017년 2월 8일
x = rand(20,1) ;
y = rand(20,1) ;
plot(x,y)
set(gca,'LooseInset',get(gca,'TightInset'));
saveas(gcf,'junk.jpg')
  댓글 수: 1
K M Ibrahim Khalilullah
K M Ibrahim Khalilullah 2017년 2월 9일
thanks for your answer... Not plot! I want to save from figure,imshow() without white border

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


James Tursa
James Tursa 2017년 2월 9일
You might check out this FEX submission by Yair Altman:

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by