[GUI] How do change the min and max values of a plot.

조회 수: 4 (최근 30일)
Shane
Shane 2012년 12월 19일
I want to change the min and max values of a plot in GUI.
And the following code doesn't work:
axis(handles.axes1,[0,100,0,1]);
This is because then when I plot a scatter after
scatter(handles.axes1, x, y);
It doesn't keep the same dimensions on the axes.
I then tried hold(handles.axes1);
between the two bits of code and it still doesn't work... confused.
What am I doing wrong?

답변 (1개)

Image Analyst
Image Analyst 2012년 12월 19일
Use the xlim() and ylim() functions.
  댓글 수: 7
Jan
Jan 2012년 12월 19일
@Shane: Besides Walter's suggestion, what about calling XLIM after all plots have been made?
Shane
Shane 2012년 12월 19일
then it sets the limits and removes the plot >.<

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

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by