How can I change axes limits of the XY Graph dynamically?
47 views (last 30 days)
Show older comments
MathWorks Support Team
on 27 Jun 2009
Commented: guygyuggfff
on 17 Jun 2021
I would like to dynamically adjust the axes limits of an XY Graph during simulation so that the trace is visible even if it exceeds the limits initially set in the Graph’s mask.
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
Simulink does not provide a way to dynamically adjust the graph axes limits, but this can be done with an M-function.
The attached M-function LIMIT_CHECK checks if data is outside the axis limits, and if so, changes the limits so that the data is fully displayed.
The example Simulink model shows that the function is separately called for each axis, and that the axes limits are reset during model initialization.
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!