フィルターのクリア

Is it possible to enable zoom in only one of the axes? (using GUIDE)

19 ビュー (過去 30 日間)
Jaime Muela Pérez
Jaime Muela Pérez 2013 年 3 月 12 日
回答済み: Nir Kaplan 2021 年 1 月 14 日
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.

回答 (2 件)

Walter Roberson
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.

Nir Kaplan
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.

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by