Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Zoom / Camera Control in subplot
Date: Tue, 4 Dec 2007 19:58:53 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 49
Message-ID: <fj4bht$mhv$1@fred.mathworks.com>
References: <fcmth5$sis$1@fred.mathworks.com> <fcoolp$llv$1@fred.mathworks.com> <fcr39g$5fo$1@fred.mathworks.com> <fcrscc$jtr$1@fred.mathworks.com> <fcrttc$gtt$1@fred.mathworks.com> <fcsg0t$cgj$1@fred.mathworks.com> <fcvr2f$p15$1@fred.mathworks.com> <ffhsqu$h66$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 1196798333 23103 172.30.248.35 (4 Dec 2007 19:58:53 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 4 Dec 2007 19:58:53 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1118512
Xref: news.mathworks.com comp.soft-sys.matlab:440794



"Maarten Lont" <m.lont@student.tue.nl> wrote in message
<ffhsqu$h66$1@fred.mathworks.com>...
> "Sonsoles Romero GarcĂ­a" <krokketilla@gmail.com> wrote in
> message <fcvr2f$p15$1@fred.mathworks.com>...
> > I have the same problem, but creating a new window is NOT an
> > option for me. I need to zoom/explore a 3-d graph inside a
> > panel of a GUI.
> > A similar problem happens if the graphic is an histogram or
> > a bar graphic (only when the parent of the axes is a panel
> > the graphic grows all over the panel, it is interesting that
> > this doesn't happen if the parent is a figure).
> > 
> > For example, using Ben's example:
> > Zoom this is ok
> > 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 = 1:1:100; y = 100*rand(1,1000);
> > axes(hax2);
> > hist(y,x,'FaceColor',[0 0.2 0.8]);
> > 
> > But, zoom this and you'll see what happens.
> > hfig = figure('Position',[200 200 800 600]);
> > panel = uipanel('position',[0.05 0.05 0.9 0.9]);
> > hax1 = axes('Position',[0.1 0.6 0.8 0.3],'parent',panel);
> > plot([0:.1:10],sin([0:.1:10]));
> > hax2 = axes('Position',[0.3 0.1 0.4 0.4],'parent',panel);
> > x = 1:1:100; y = 100*rand(1,1000);
> > axes(hax2);
> > hist(y,x,'FaceColor',[0 0.2 0.8]);
> > 
> > I am using Matlab 7.1.0.246 (R14) Service Pack 3
> 
> I found a workaround on a website. Add the line:
> 
> zoom on;
> 
> after you plot the data. Now you can zoom on every plot.
> 
> Best regards,
> Maarten


The problem is when you zoom on the histogram because it
becomes bigger than the axes area (taking up all the panel)
and the same happens when I try to zoom a 3D graphic. I
don't know how to control the zoom for a 3D plot inside its
axes.