필터 지우기
필터 지우기

How to plot several .jpg images in one figure

조회 수: 3 (최근 30일)
Guillermo Lopez
Guillermo Lopez 2012년 8월 23일
Hello: I want to place several images I have in one figure so that I end up with seven images (at different sizes) on one same page. The images are positiones in a 6x2 cell array that I have created using subplot. The position of each individual image would be as follows: image1:cells 1,2,7,8 image2: cell 3 image3: cell 4 image4: cell 9 image5: cell 10 image6: cells 5,6 image7: cells 11,12 So in the end I end up with different sizes of images. The problem is the following. Whenever I run my code the images are not adjacent to one another. They are separated by blanck spaces, and image 1 seems to be the same size as image 6 and 7 although it should be double it's size. My code is:
[X1,map1]=imread('IMG_4866.jpg');%carga imagen a
[X2,map2]=imread('IMG_4867.jpg');%carga imagen b
[X3,map3]=imread('IMG_4868.jpg');%carga imagen c
[X4,map4]=imread('IMG_4869.jpg');%carga imagen d
[X5,map5]=imread('IMG_4915.jpg');%carga imagen e
[X6,map6]=imread('IMG_4916.jpg');%carga imagen f
[X7,map7]=imread('IMG_3922.jpg');%carga imagen f2
subplot(2,6,[1,2,7,8]), imshow(X1,map1)
subplot(2,6,3), imshow(X2,map2)
subplot(2,6,4), imshow(X3,map3)
subplot(2,6,9), imshow(X4,map5)
subplot(2,6,10), imshow(X5,map5)
subplot(2,6,[5 6]), imshow(X6,map6)
subplot(2,6,[11 12]), imshow(X7,map7)
Please I need some help so that I can get the images adjacent to one another as if it were three columns, and the first column had one row, second column 4 and third column 2. Thanks to everyone in advance

답변 (0개)

카테고리

Help CenterFile Exchange에서 Subplots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by