Is it possible to enable zoom in only one of the axes? (using GUIDE)
24 次查看(过去 30 天)
显示 更早的评论
Hi,
I'm making a GUI with the Matlab's GUIDE tool. I have two different axes; in one of them i'm plotting some 2-D data, while in the other one im plotting some 3-D data. I want to enable the zoom in only the first one, but no matter what i do it just enables itself on both of the axes. Is there any way i can do that? I'm trying to do
zoom(handles.plot_time, 'on');
where plot_time is the name of the axes i want to zoom in, but like i said it also enables zoom in the other one. Maybe there's something wrong with my code somewhere else, but i've looked everywhere.
Thanks in advance.
0 个评论
回答(2 个)
Walter Roberson
2013-3-12
No, zoom() applies to the entire figure.
However, you can use zoom's ButtonDownFilter callback to check which axes you are over and return false if you do not want that axes zoomed.
0 个评论
Nir Kaplan
2021-1-14
The "setAllowAxesZoom" function can be used to enable\disable the Zoom function for specific axes.
By defult all the axes in the figure are enable for zomming, so i assume you wand to disable specific axes, for that i added to the "OpeningFcn" of the GUI the folowing line:
% Disable zoom in images axes
setAllowAxesZoom(zoom(), handles_to_image_axes, false);
I use R2013B.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!