How to set UIAxes min and max lim for plot in app designer ?
129 views (last 30 days)
Show older comments
Hi All
to set a min and max limit for my UIAxes in add designer I use :
ax=app.UIAxes;
ax.YLim([minlim,maxlim])
but I get the error :
Subscript indices must either be real positive integers or logicals.
7 Comments
Accepted Answer
Adam Danz
on 13 Apr 2020
Edited: Adam Danz
on 13 Apr 2020
It looks like what you want to do is
axis(app.UIAxes, 'tight')
Your current code does not give you the minimum of all plotted signals. It just gives you the minimum (and maximum) of the last plotted signal listed in app.UIAxes.Children since you're overwriting the minlim and maxlim values upon each iteration of the for-loops.
8 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!