scaling the dimensions of subplots

12 views (last 30 days)
Jason
Jason on 6 Oct 2014
Commented: Jason on 13 Oct 2014
How can I plot the following three images so that they individually maintain the same aspect ratio, but they are the same size in the horizontal direction. It represents a scan over a sample in which there are 3 individual scans making up the composite. As there are 6 large square features in the vertical I thought creating a subplot with 6, and using the example attached would work, but clearly its not scaling properly.
  10 Comments
Jason
Jason on 10 Oct 2014
I use the following code for each image to create the montage.
IM = imread(f);
IM=imrotate(IM,angle);
x=(width+0.0005)*(index-(row*step)-1); %width, row, step for montaging
positionVector = [os+x, y, width, 0.08];
hp = handles.uipanelM;
h=subplot('Position',positionVector,'Parent',hp); %to enable deleting use handles
% update handle array
hSubplots = [hSubplots ; h]; %Concatenate
axis off;
hold off;
IM1 = impyramid(IM, 'reduce'); %downsample by 2 for montage (but not zoomed in image
Im_Scale(IM1,4000);
Jason
Jason on 13 Oct 2014
Sorry...forgot to include my function Im_Scale
function Im_Scale(Image,Scale)
imagesc(Image,[0 Scale])
%imagesc(Image,[500 2000])
colormap (jet);
axis off;
set(gca,'ytick',[]);
set(gca,'xtick',[]);
drawnow;

Sign in to comment.

Answers (0)

Categories

Find more on MATLAB Support Package for IP Cameras in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!