Effacer les filtres
Effacer les filtres

Limiting UIAxes Interactivity in AppDesigner

44 vues (au cours des 30 derniers jours)
Veena Chatti
Veena Chatti le 12 Sep 2020
Commenté : Adam Danz le 25 Août 2022
Hi!
I'm using three UIAxes to display plots, and I'd like to be able to limit their interactivity such that the zoom in/out, and save/export buttons neither appear nor work. Are there commands to enable/disable these in AppDesigner?
Thanks in advance for your suggestions!

Réponse acceptée

Adam Danz
Adam Danz le 13 Sep 2020
Modifié(e) : Adam Danz le 13 Sep 2020
The first line below turns off default interactivity and the second line turns off the toolbar options.
disableDefaultInteractivity(app.UIAxes)
app.UIAxes.Toolbar.Visible = 'off';

Plus de réponses (2)

Mario Malic
Mario Malic le 12 Sep 2020
Modifié(e) : Mario Malic le 13 Sep 2020
I am not aware of the option to save/export fig in App Designer.
For limiting interactivity:
ax = app.UIAxes; % change to your UIAxes handle
ax.Interactions = [panInteraction];
ax.Toolbar.Visible = 'off';
  7 commentaires
Mario Malic
Mario Malic le 13 Sep 2020
I sourced my information from UIAxes properties which also mentioned disableDefaultInteractivity, but didn't checked it.
"I enjoy and learn from other people's approaches such as this one." - Likewise!
Veena Chatti
Veena Chatti le 22 Sep 2020
Thank you both for your inputs! I found that Adam's answer worked!

Connectez-vous pour commenter.


Bruno Gonfiotti
Bruno Gonfiotti le 18 Sep 2020
I tested the solutions here proposed, but in Matlab 2020b I get the following error: Invalid or deleted object. Error in disableDefaultInteractivity (line 12). ax.InteractionContainer.Enabled = 'off';
Do you have any suggestion?
  8 commentaires
Ioannis
Ioannis le 24 Août 2022
Déplacé(e) : Adam Danz le 25 Août 2022
How can I use disableDefaultInteractivity for all the functions?
Adam Danz
Adam Danz le 25 Août 2022
@Ioannis, can you explain what you mean by "functions"? Do you mean interactions? What interactions still existed after executing disableDefaultInteractivity?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Specifying Target for Graphics Output dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by