Can set the lower limit of the axis manually but leaving to auto the upper limit
70 ビュー (過去 30 日間)
古いコメントを表示
I want to control only the lower limit of the axis and not the upper. I want the upper to be automatic. Is there any way to do it with set?
0 件のコメント
回答 (3 件)
Azzi Abdelmalek
2013 年 6 月 1 日
xlim([2 inf])
ylim([4 inf])
Giorgos Papakonstantinou
2013 年 6 月 1 日
7 件のコメント
Pw
2014 年 9 月 4 日
The solution worked great for me:
limsy=get(gca,'YLim');
set(gca,'Ylim',[2 limsy(2)];
Quick question, what does the 2 in limsy(2) indicate. I feel as if I should know the answer but it is eluding me at the moment.
Thanks!
Jason
2014 年 11 月 18 日
2nd value from Ylim (i.e it consists of ymin and ymax), so it reports back ymax
Walter Roberson
2013 年 6 月 1 日
No.
You could probably work something up using a listener or two to detect changes to the xdata or ydata and to set() the xlim and ylim as appropriate. I wouldn't bother doing it that way, though.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!