How can I save only content of matlab figure ?

29 Ansichten (letzte 30 Tage)
K M Ibrahim Khalilullah
K M Ibrahim Khalilullah am 8 Feb. 2017
Beantwortet: James Tursa am 9 Feb. 2017
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.

Antworten (2)

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

Melden Sie sich an, um zu kommentieren.


James Tursa
James Tursa am 9 Feb. 2017
You might check out this FEX submission by Yair Altman:

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by