How can I save only content of matlab figure ?

36 visualizaciones (últimos 30 días)
K M Ibrahim Khalilullah
K M Ibrahim Khalilullah el 8 de Feb. de 2017
Respondida: James Tursa el 9 de Feb. de 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.

Respuestas (2)

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

Iniciar sesión para comentar.


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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by