Expand the Y-axis Scale

I'm plotting a simple linear plot, but MATLAB only
shows my plot up to the maximum y axis value at 0.7.
However, I need my MATLAB plot to show > 0.7
value of the y axis. I know I can use axis equal.
But I don't want to manually input the y limit values
since it will change with different data sets.
Is there another way to expand the axis greater than 0.7?
Code:
x1 = [0 0.2 0.3 0.4 1];
y2 = [0.5 0.6 0.6 0.6 0.7]
plot(x1,y1);
%axis equal; %will work but looking for a different alternative
Thanks, Amanda

 채택된 답변

Babak
Babak 2012년 12월 5일

0 개 추천

you can do this before axis equal:
axis([0 1 0 0.9])

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

질문:

2012년 12월 5일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by