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.
Mischa Kim
Mischa Kim 2014 年 2 月 11 日
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 ExchangeGraphics についてさらに検索

質問済み:

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