How do i change the size of displayed images in a figure ?

7 次查看(过去 30 天)
Hello,
I want to display a total of 50 (or 25) images in one figure, the thing that happens is they look small, how can i change their size please ?
here's an example of how they look.

采纳的回答

DGM
DGM 2021-4-24
There's a couple things going on here. Not knowing what plot commands you're using, I'll just start with an example. I'm going to load 20 images and tile them using defaults. Nothing special here. I added a border so it's easier to see the image size against this white bg.
% load a bunch of face images into a cell array
facestack=mimread('sources/faces/BioID_15*.pgm');
m=4;
n=5;
for f=1:(m*n)
subplot(m,n,f)
imshow(facestack{f})
end
The default subplot padding is pretty huge. Instead of fiddling with geometries, I just tend to use this:
% load a bunch of face images into a cell array
facestack=mimread('sources/faces/BioID_15*.pgm');
m=4;
n=5;
for f=1:(m*n)
subplot_tight(m,n,f)
imshow(facestack{f})
end
Okay, so that's better, but what if I had paid no attention to the relationship between the aspect ratio of the figure and the aspect ratio of the axes?
% load a bunch of face images into a cell array
facestack=mimread('sources/faces/BioID_15*.pgm');
m=10;
n=2;
for f=1:(m*n)
subplot_tight(m,n,f)
imshow(facestack{f})
end
See what's going on here?

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by