how to save figures without margin?

19 次查看(过去 30 天)
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?

采纳的回答

Valeriy
Valeriy 2020-2-23
Try:
axis off; % If you have axis titles, labels, etc.
set (gca,'Position',[0 0 1 1]);
print(gcf,'Test.jpg', '-djpeg', '-r300');

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Geometric Transformation and Image Registration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by