I'm having troubling controlling the zooming of UIAxes in an app I'm desiging. The app has several buttons that generate different graphs. The way it should work is to make the x and y scale tight around the graphs each time a new graph is produced on the axes. I have been unable to achieve this behaviour, because if a user zooms in on a graph, I have found no good way to reset the zoom to make it tight around the next graph.
Some things I've tried are:
- recreating the graph each time. this worked but it's slow and glitchy when the app is resized
- set(app.UIAxes, 'XLimSpec', 'Tight'); set(app.UIAxes, 'YLimSpec', 'Tight');. - this has no perceivable effect on the user's zoom
- zoom(app.UIAxes, 'RESET'); - this didn't compile, even though zoom(app.UIAxes, 'ON'), did compile
I'd be grateful if someone has the solution to this.