Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
display images

Subject: display images

From: siyamalan manivannan

Date: 13 Aug, 2010 18:42:23

Message: 1 of 11

Hi
How can I display two images on a figure without resizing them?
-siyamalan

Subject: display images

From: ImageAnalyst

Date: 13 Aug, 2010 18:48:09

Message: 2 of 11

On Aug 13, 2:42 pm, "siyamalan manivannan" <manishi...@yahoo.com>
wrote:
> Hi
> How can I display two images on a figure without resizing them?
> -siyamalan

-------------------------------------------------------------------------------------------------
Look at the 'InitialMagnification' argument of imshow().

Subject: display images

From: Sean

Date: 13 Aug, 2010 18:49:19

Message: 3 of 11

"siyamalan manivannan" <manishiyam@yahoo.com> wrote in message <i443me$mmv$1@fred.mathworks.com>...
> Hi
> How can I display two images on a figure without resizing them?
> -siyamalan

hints:
doc subplot
doc imshow

Subject: display images

From: siyamalan manivannan

Date: 13 Aug, 2010 19:53:17

Message: 4 of 11

I am new to this forum..

This is the code I am using, but the result is resized images.
If I disply one image per figure it works fine.

im1=imread('100_l1_[0-10].jpg');
im2=imread('100_l1_[10-20].jpg');

sp1 = subplot(2,1,1);
imshow(im1);

sp2 = subplot(2,1,2);
imshow(im2);



I have tried these too..
set(hFigure,'position',[10 10 1000 160]);
imshow(im1, 'InitialMagnification',100);

Subject: display images

From: siyamalan manivannan

Date: 13 Aug, 2010 19:53:17

Message: 5 of 11

I am new to this forum..

This is the code I am using, but the result is resized images.
If I disply one image per figure it works fine.

im1=imread('100_l1_[0-10].jpg');
im2=imread('100_l1_[10-20].jpg');

sp1 = subplot(2,1,1);
imshow(im1);

sp2 = subplot(2,1,2);
imshow(im2);



I have tried these too..
set(hFigure,'position',[10 10 1000 160]);
imshow(im1, 'InitialMagnification',100);

Subject: display images

From: siyamalan manivannan

Date: 13 Aug, 2010 19:55:21

Message: 6 of 11

I am new to this forum..

This is the code I am using, but the result is resized images.
If I disply one image per figure it works fine.

im1=imread('100_l1_[0-10].jpg');
im2=imread('100_l1_[10-20].jpg');

sp1 = subplot(2,1,1);
imshow(im1);

sp2 = subplot(2,1,2);
imshow(im2);



I have tried these too..
set(hFigure,'position',[10 10 1000 160]);
imshow(im1, 'InitialMagnification',100);

Subject: display images

From: Sean

Date: 13 Aug, 2010 19:59:05

Message: 7 of 11

"siyamalan manivannan" <manishiyam@yahoo.com> wrote in message <i447rd$gji$1@fred.mathworks.com>...
> I am new to this forum..
>
> This is the code I am using, but the result is resized images.
> If I disply one image per figure it works fine.
>
> im1=imread('100_l1_[0-10].jpg');
> im2=imread('100_l1_[10-20].jpg');
>
> sp1 = subplot(2,1,1);
> imshow(im1);
>
> sp2 = subplot(2,1,2);
> imshow(im2);
>
>
>
> I have tried these too..
> set(hFigure,'position',[10 10 1000 160]);
> imshow(im1, 'InitialMagnification',100);

Try the 'fit' option of 'InitialMagnification'.

I.e.
sp2 = subplot(2,1,2);
imshow(im2,'InitialMagnification','fit');

Subject: display images

From: siyamalan manivannan

Date: 13 Aug, 2010 20:09:07

Message: 8 of 11

Thanks but that is also not working...

Subject: display images

From: ImageAnalyst

Date: 13 Aug, 2010 20:53:36

Message: 9 of 11

Do you want an image to appear pixel-for-pixel with scrollbars shown
for panning/scrolling if the image is bigger than the size of the axes
it's being displayed in?

Subject: display images

From: siyamalan manivannan

Date: 15 Aug, 2010 04:14:21

Message: 10 of 11

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <7eb98011-c18a-48a1-b69a-33fea199205f@d8g2000yqf.googlegroups.com>...
> Do you want an image to appear pixel-for-pixel with scrollbars shown
> for panning/scrolling if the image is bigger than the size of the axes
> it's being displayed in?

Exactly I need a solution like that.
But my image is small it is a ECG strip of 160X1000 size. It is not displaying two images in a figure properly. But if I use only one image per figure it is displaying properly.

Subject: display images

From: ImageAnalyst

Date: 15 Aug, 2010 15:13:28

Message: 11 of 11

On Aug 15, 12:14 am, "siyamalan manivannan" <manishi...@yahoo.com>
wrote:
> ImageAnalyst <imageanal...@mailinator.com> wrote in message <7eb98011-c18a-48a1-b69a-33fea1992...@d8g2000yqf.googlegroups.com>...
> > Do you want an image to appear pixel-for-pixel with scrollbars shown
> > for panning/scrolling if the image is bigger than the size of the axes
> > it's being displayed in?
>
> Exactly I need a solution like that.
> But my image is small it is a ECG strip of 160X1000 size. It is not displaying two images in a figure properly. But if I use only one image per figure it is displaying properly.
--------------------------------------------------------------------------


That's been discussed before. Go here for the solution:

http://www.mathworks.com/matlabcentral/newsreader/search_results?search_string=zoom+sldZoom

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us