Setting axis limits of a plot

조회 수: 8 (최근 30일)
Matt
Matt 2011년 7월 4일
I have two sets of data, x and y which I am plotting together:
plot(x,y)
I'm having a problem setting the axis limits however. I am using the method shown in the online documentation:
axis([xmin,xmax,ymin,ymax])
Or in my case:
axis([1,1024,1,1024])
The problem is when I enter this it creates a new figure with the correct limits but with no data plotted.

채택된 답변

Paulo Silva
Paulo Silva 2011년 7월 4일
axis(gca,[1,1024,1,1024])
or
ax=axes
plot(x,y)
axis(ax,[1,1024,1,1024])
  댓글 수: 3
Paulo Silva
Paulo Silva 2011년 7월 4일
set(gca,'ydir','reverse')
C.J. Harris
C.J. Harris 2011년 7월 4일
or simply:
axis ij

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by