How to change y-axis limit of a histogram
49 次查看(过去 30 天)
显示 更早的评论
I want to add a histogram to a GUI, but i have to keep it small, when i initiate it, it shows a value of 5000 on y axis whereas the frequency of pixels is less than 500 so i want to decrease it to clearly show the bars. So can anybody tell me on how to change y axis limit in imhist.
回答(2 个)
Image Analyst
2014-6-3
Take the log before you display it. Or suppress one of the bins by setting it to zero. You can change the limits with ylim
ylim([0 500]);
3 个评论
José-Luis
2016-6-30
It would be easier to get an answer by asking a new question, instead of commenting on a two-year old post.
Seems like you might want something like:
R_size.YLim = [minim, maxim]
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Histograms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!