Limiting UIAxes Interactivity in AppDesigner

45 次查看(过去 30 天)
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!

采纳的回答

Adam Danz
Adam Danz 2020-9-13
编辑:Adam Danz 2020-9-13
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';

更多回答(2 个)

Mario Malic
Mario Malic 2020-9-12
编辑:Mario Malic 2020-9-13
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 个评论
Mario Malic
Mario Malic 2020-9-13
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 2020-9-22
Thank you both for your inputs! I found that Adam's answer worked!

请先登录,再进行评论。


Bruno Gonfiotti
Bruno Gonfiotti 2020-9-18
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 个评论
Ioannis
Ioannis 2022-8-24
移动:Adam Danz 2022-8-25
How can I use disableDefaultInteractivity for all the functions?
Adam Danz
Adam Danz 2022-8-25
@Ioannis, can you explain what you mean by "functions"? Do you mean interactions? What interactions still existed after executing disableDefaultInteractivity?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Specifying Target for Graphics Output 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by