How can I save only content of matlab figure ?

33 ビュー (過去 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 Center および File ExchangePrinting and Saving についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by