Borrar filtros
Borrar filtros

how to save figures without margin?

21 visualizaciones (últimos 30 días)
Jack Xiao
Jack Xiao el 11 de Mayo de 2019
Comentada: Nick Tsui el 17 de Nov. de 2022
as the title, I need to save the figures or images shown in the figure with the same size of the image.
but there are always margins as shown in the following: (the size is 604x593)
捕获asda.PNG
the orginal image is : (the size is 500x430)
ILSVRC2012_val_00000224.JPEG
how to save figures without margin?

Respuesta aceptada

Valeriy
Valeriy el 23 de Feb. de 2020
Try:
axis off; % If you have axis titles, labels, etc.
set (gca,'Position',[0 0 1 1]);
print(gcf,'Test.jpg', '-djpeg', '-r300');
  2 comentarios
Maximiliano Barbosa
Maximiliano Barbosa el 18 de Feb. de 2022
Thank you
Nick Tsui
Nick Tsui el 17 de Nov. de 2022
There are still some margins on both left and right sides of the image.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Images en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by