Adjusting axis limits
1 次查看(过去 30 天)
显示 更早的评论
I am trying to have the axis limits automatically adjust. I know they do by default, but they way it does it, the extreme data points are right on the edge of the plot. Is there any way to specify a margin?
I looked in axis properties but didn't see anything.
0 个评论
采纳的回答
Walter Roberson
2011-11-3
No, there is no mechanism for specifying a margin.
3 个评论
Walter Roberson
2011-11-3
max(YourData(isfinite(YourData(:)))
Or use NaN instead of inf, as max() ignores NaN.
Jan
2011-11-3
Exactly for this task I'm using MinMaxElem(Y, 'finite'): http://www.mathworks.com/matlabcentral/fileexchange/30963-minmaxelem .
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Discrete Data Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!