How can I reset the zoom factor of uiaxes (AppDesigner) programmatically?

I'm programming a GUI in AppDesigner with an uiaxes object. I can zoom in/out by scrolling with the mouse wheel. But how can I reset the axis limits in the program? I would like to use app.uiaxes.XLim='auto' and app.uiaxes.YLim='auto' to get proper axis limits.

Answers (1)

This answer may be a year late, but perhaps this will help someone else.
Give the following a try:
app.UIAxes.XLim = [-inf inf];
app.UIAxes.YLim = [-inf inf];
This technique is referenced in the documentation for UIAxes, linked below. It worked for one of my projects.

Categories

Asked:

on 21 Nov 2018

Commented:

on 22 Jul 2021

Community Treasure Hunt

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

Start Hunting!