hgexport(gcf, 'figure1.jpg', hgexport('factorystyle'), 'Format', 'jpeg');
By using above function I am saving figure which is shown below:
But I want to save it as shown below: (with outer white portion of image)
How can I do so?

댓글 수: 2

Walter Roberson
Walter Roberson 2014년 2월 11일
Sorry, you do or you do not want the white part with the numbers and ticks?
Explorer
Explorer 2014년 2월 11일
Yeah, I do not want the white part.

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

 채택된 답변

Mischa Kim
Mischa Kim 2014년 2월 11일

0 개 추천

This answer illustrates the how-to well. Simply clip the figure based on its size.

댓글 수: 5

Explorer
Explorer 2014년 2월 11일
I need to do that with code.
Mischa Kim
Mischa Kim 2014년 2월 11일
편집: Mischa Kim 2014년 2월 11일
Yep, the code is shown in the answer I referred you to. The only other thing you need, in addition, would probably be
set(gca,'XTick',[],'YTick',[])
to remove the axis ticks.
Explorer
Explorer 2014년 2월 11일
Thanks man! I got it.
Just use the export command you have been using:
hgexport(gcf, 'figure1.jpg', hgexport('factorystyle'), 'Format', 'jpeg');
Explorer
Explorer 2014년 2월 11일
Okay thanks

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Graphics에 대해 자세히 알아보기

질문:

2014년 2월 11일

댓글:

2014년 2월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by