I often need to plot 10 images together, but using this code results in small images :
img = rand(400,600);
for i=1:10
subplot(2,5,i);
imshow(img);
title(['Image ' int2str(i)]);
end
As you can see, the images do not use all available space in the screen. How can I increase the size, or decrease the padding/margin between them?
Thanks for any help.
解决方案
I don't believe there is an easy way to do it. There are two options:
First, use the position part of the subplot:
>> subplot(2,5, i, [l, b, w, h])
and calculate the left, bottom, width, height.
Or, get the handle of the returned axis:
>> h(i) = subplot(2,5,i);
and then modify the axis afterward.
>> set(h(1), 'positio