app designer how to make zoom out for my plot ?

50 vues (au cours des 30 derniers jours)
tomer polsky
tomer polsky le 12 Déc 2019
Modifié(e) : Adam Danz le 14 Juin 2023
I am using plot in my app designer ,how to make zoom out into my plot in the app designer ?
I found command for doing zoom in the plot of the plot of the appdesigner , how to do zoom out ?
1)is there a command ? becouse I tried zoom(app.UIAxes,'out') but I get error .
2) also in the matlab there is the command ytickes ( this command is giving me to the option to control y numbers of the y label ) , is there a similier command in the app designer ?
zoom(app.UIAxes,'on') %% zoom in the plot of matlab app designer
  1 commentaire
Adam Danz
Adam Danz le 12 Déc 2019
Modifié(e) : Adam Danz le 16 Déc 2019
Zooming in and out can be controlled by your mouse. What command are you using to zoom in and what is your Matlab release number?
Regarding ytick, you can set them directly from your axis handle.
app.UIAxes.YTick

Connectez-vous pour commenter.

Réponses (1)

Adam Danz
Adam Danz le 12 Déc 2019
Modifié(e) : Adam Danz le 14 Juin 2023
Review of zoom methods in App Designer UIAxes
This topic continues to come up in the forum. The solution varies between Matlab releases.
Matlab release >= r2019a
Starting in r2019a, Control Chart Interactivity was enabled in App Designer. By default, when you hover over a UIAxes in App Designer you'll see a toolbar appear in the upper right of the axes.
The + and - icons will allow you to zoom in/out of the axes using your mouse. The hand icon will allow you to pan the axes. If this toolbar doesn't appear, it may have been turned off. To enable it, set the Visible property of the toolbar to 'on'.
app.UIAxes.Toolbar.Visible = 'on'; % or 'off' to disable
Matlab release r2017a - r2018b
Prior to r2019a, some interactive functionality was not supported. However, the pan and zoom utilities were available in App Designer starting in r2017a. When pan or zoom is set to 'on', you can use your mouse to interactively navigate the UIAxes.
Starting in MATLAB R2018b pan and zoom were enabled by default.
pan(app.UIAxes,'on'); % or 'off'
zoom(app.UIAxes,'on'); % or 'off'
Matlab release < r2017a
Prior to r2017a you cannot use the interactive chart tools nor the pan/zoom methods in app axes. A low-level way to zoom/pan an App Designer UIAxes is to control the axis limits using xlim(), ylim() and zlim(). You could add numeric text boxes to your app where the user can specify the axis limits or you could add arrow buttons that controll panning and zooming. The callback functions would adjust the axis limits as needed.
Another button could be added to return the axes to their default limits using these lines within the callback function.
app.UIAxes.XLimMode = 'auto';
app.UIAxes.YLimMode = 'auto';
app.UIAxes.ZLimMode = 'auto';

Catégories

En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by