필터 지우기
필터 지우기

changing y limit of a plot

조회 수: 5 (최근 30일)
LUI PAUL
LUI PAUL 2015년 4월 4일
댓글: Image Analyst 2015년 4월 5일
i have x column matrix...the plotting is shown...how to change y axis limit between 0 to 1 not changing x values? please help....

채택된 답변

Image Analyst
Image Analyst 2015년 4월 5일
Use the ylim() function to set the limits of the y axis:
y = y / max(y); % Normalize y
bar(x, y);
ylim([0, 1]);
  댓글 수: 7
LUI PAUL
LUI PAUL 2015년 4월 5일
thank you Image Analyst.....thank you so much....its working.
Image Analyst
Image Analyst 2015년 4월 5일
You're welcome. Go ahead and officially "Accept this answer" then. Thanks in advance.

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

추가 답변 (1개)

dpb
dpb 2015년 4월 4일
I presume you mean to normalize the values as simply changing the y-axis limits on the plot would just leave a solid blob across the whole graph...how, precisely, to compute that is dependent upon how you have the data that made the plot which you haven't revealed...
  댓글 수: 1
LUI PAUL
LUI PAUL 2015년 4월 5일
편집: LUI PAUL 2015년 4월 5일
y lim is 0 to 450..and i want to make the limit 0 to 1 with out effecting the x values.that means 450/450=1;0/450=0;actually i want to normalize the data amounts,not the values.

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

카테고리

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