zoom X axis only - app designer

15 次查看(过去 30 天)
Blazej Dobija
Blazej Dobija 2021-2-18
回答: Rik 2021-2-18
I try to lock Y axis during zoom for my axes but uiaxes seems to not support some features like axes from figure
1) there is no context menu "zoom ou" , "resotore view", "unconstrained zoom" , "horizntal zoom" , "vertical zoom"
2) any commands controling zoom behaviour not working
zoom(app.axe2,'xon'); % not working
q = zoom(app.axe2);
q.Motion = 'horizontal'; % not working
Then is here any workaround for "horizontal zoom" feature for example at app designer? For my project its quite essential property.

回答(1 个)

Rik
Rik 2021-2-18
Your app is a uifigure, so you can test this outside of AppDesigner. It turns out you need to be fairly specific with your handles, but the code below should allow you to use a horizontal zoom in a uifigure (and therefore in an AppDesigner app).
f=uifigure;
ax=axes(f);
plot(1:10,'.','parent',ax)
h=zoom(f);
h.Motion = 'horizontal';
h.Enable = 'on';

类别

Help CenterFile Exchange 中查找有关 Develop uifigure-Based Apps 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by