Path: news.mathworks.com!not-for-mail
From: "Ben " <basburywvu.nospam@hotmial.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Zoom / Camera Control in subplot
Date: Tue, 18 Sep 2007 14:51:37 +0000 (UTC)
Organization: Orbital Sciences Corp
Lines: 21
Message-ID: <fcoolp$llv$1@fred.mathworks.com>
References: <fcmth5$sis$1@fred.mathworks.com>
Reply-To: "Ben " <basburywvu.nospam@hotmial.com>
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 1190127097 22207 172.30.248.35 (18 Sep 2007 14:51:37 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 18 Sep 2007 14:51:37 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 425457
Xref: news.mathworks.com comp.soft-sys.matlab:429115



Here is an example.  When the last line is executed the
second plot becomes to large and overlaps the top axis. 
What I would like is for it zoom in on a region of the 3-d
plot, keeping the axes size/position the same.  Not make the
axes larger. The only way I have been able to make this work
is to actually make a second figure and place it over the
first.  There has to be a better way

% --------------
hfig = figure('Position',[200 200 800 600]);
hax1 = axes('Position',[0.1 0.6 0.8 0.3]);
plot([0:.1:10],sin([0:.1:10]));
hax2 = axes('Position',[0.3 0.1 0.4 0.4]);
[x,y,z] = sphere(24)
axes(hax2);surf(x,y,z,'FaceColor',[0 0.2 0.8])
axis vis3d
%Now try to zoom on the sphere it takes over the plot
camzoom(hax2,3)
% --------------

Thanks.