zoom X axis only - app designer
6 views (last 30 days)
Show older comments
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.
0 Comments
Answers (1)
Rik
on 18 Feb 2021
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';
0 Comments
See Also
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!