Path: news.mathworks.com!not-for-mail
From: "Vihang Patil" <vihang_patil@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: zoom
Date: Tue, 12 Feb 2008 12:04:01 +0000 (UTC)
Organization: Konem Solutions
Lines: 49
Message-ID: <fos1vh$8ng$1@fred.mathworks.com>
References: <fnmoqu$3sv$1@fred.mathworks.com> <fnmq0f$h6j$1@fred.mathworks.com> <fnmqsi$s79$1@fred.mathworks.com> <fnn0gi$4ll$1@fred.mathworks.com> <fos11i$ra5$1@fred.mathworks.com>
Reply-To: "Vihang Patil" <vihang_patil@yahoo.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1202817841 8944 172.30.248.38 (12 Feb 2008 12:04:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 12 Feb 2008 12:04:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 842609
Xref: news.mathworks.com comp.soft-sys.matlab:450777


"shopana " <shopana.e@hcl.in> wrote in message <fos11i$ra5
$1@fred.mathworks.com>...
> "Vihang Patil" <vihang_patil@yahoo.com> wrote in message 
> <fnn0gi$4ll$1@fred.mathworks.com>...
> > "shopana " <shopana.e@hcl.in> wrote in message 
> <fnmqsi$s79
> > > thanks for your speedy reply.can you give me simple 
> > > example in slider using zoom(factor).
> > 
> > Example:
> > 
> > function slidertp
> > load clown
> > h = figure,imshow(X,map);
> > h1 = uicontrol('Style','Slider','Callback',
{@myzoom,h});
> > 
> > function myzoom(obj,event,h)
> > val = get(obj,'Value');
> > if isempty(get(obj,'UserData'))
> >     val_temp = val;
> >     set(obj,'UserData',val_temp);
> > else
> >     val_temp = get(obj,'UserData');
> > end
> > if val>=val_temp
> >     zoom(h,1.01);%zoom factor
> >     val_temp = val;
> >     set(obj,'UserData',val_temp);
> > else
> >     zoom(h,0.99);%zoom factor
> >     val_temp = val;
> >     set(obj,'UserData',val_temp);
> > end
> > 
> > 
> > HTH
> > Vihang
> 
> 
> its working fine.In the same slider how can i make it to 
> zoom only horizontally by some factor?


doc zoom 
zoom xon
zoom yon

Vihang