|
"Vihang Patil" <vihang_patil@yahoo.com> wrote in message
<fos1vh$8ng$1@fred.mathworks.com>...
> "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
if i use Zoom xon,we cant make it to zoom by some factor
say(0.5x,1x,etc,..)by itself.
i ve one axes and 4 push buttons, when i click the first
button the axes will zoom(horizonally) by 0.5%,second
button 1%,third button 2%,then forth button 4%... is this
possible?
|