Limiting UIAxes Interactivity in AppDesigner

53 views (last 30 days)
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!

Accepted Answer

Adam Danz
Adam Danz on 13 Sep 2020
Edited: Adam Danz on 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';

More Answers (2)

Mario Malic
Mario Malic on 12 Sep 2020
Edited: Mario Malic on 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 Comments
Veena Chatti
Veena Chatti on 22 Sep 2020
Thank you both for your inputs! I found that Adam's answer worked!

Sign in to comment.


Bruno Gonfiotti
Bruno Gonfiotti on 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 Comments
Adam Danz
Adam Danz on 25 Aug 2022
@Ioannis, can you explain what you mean by "functions"? Do you mean interactions? What interactions still existed after executing disableDefaultInteractivity?

Sign in to comment.

Categories

Find more on Migrate GUIDE Apps 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!