changing y limit of a plot
5 次查看(过去 30 天)
显示 更早的评论
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....
0 个评论
采纳的回答
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 个评论
Image Analyst
2015-4-5
You're welcome. Go ahead and officially "Accept this answer" then. Thanks in advance.
更多回答(1 个)
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...
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!