zoom X axis only - app designer

12 vues (au cours des 30 derniers jours)
Blazej Dobija
Blazej Dobija le 18 Fév 2021
Réponse apportée : Rik le 18 Fév 2021
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.

Réponses (1)

Rik
Rik le 18 Fév 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';

Catégories

En savoir plus sur Develop uifigure-Based Apps dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by