Can set the lower limit of the axis manually but leaving to auto the upper limit
70 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (3)
Azzi Abdelmalek
am 1 Jun. 2013
xlim([2 inf])
ylim([4 inf])
Giorgos Papakonstantinou
am 1 Jun. 2013
7 Kommentare
Pw
am 4 Sep. 2014
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
am 18 Nov. 2014
2nd value from Ylim (i.e it consists of ymin and ymax), so it reports back ymax
Walter Roberson
am 1 Jun. 2013
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 Kommentare
Siehe auch
Kategorien
Mehr zu Annotations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!