Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: different size subwindows?
Date: Mon, 6 Oct 2008 10:02:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 15
Message-ID: <gccnmq$fdu$1@fred.mathworks.com>
References: <gcbeeq$g75$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1223287322 15806 172.30.248.35 (6 Oct 2008 10:02:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 6 Oct 2008 10:02:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869888
Xref: news.mathworks.com comp.soft-sys.matlab:493789


Dear David Doria!

> Original = imread('../lena.bmp');
> nearest = imresize(Original, 2, 'nearest');
> figure
> spax1 = subplot(1,2,1); imshow(Original)
> spax2 = subplot(1,2,2); imshow(nearest)
>
> The variables contain twice as many pixels, so why isn't this reflected in the display?

The sizes of the created axes objects are determined by the SUBPLOT command. In consequence, the 2nd plot contains 4 times (not twice) more data points (not pixels) as the 1st one. Try it with a 1x1 picture!

To create larger pictures, you can adjust the POSITION property of the spax1/2 objects.

Jan