How to change y-axis limit of a histogram

210 views (last 30 days)
Mohammad  Ahmed
Mohammad Ahmed on 25 May 2014
Commented: Brando Miranda on 26 Mar 2017
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.
  1 Comment
Brando Miranda
Brando Miranda on 26 Mar 2017
what if its a hist3 i.e. histogram in 2D

Sign in to comment.

Answers (2)

Image Analyst
Image Analyst on 3 Jun 2014
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 Comments
Brando Miranda
Brando Miranda on 26 Mar 2017
what if its a hist3 i.e. histogram in 2D

Sign in to comment.


jawad mansoor
jawad mansoor on 25 May 2014
ye le merey dost :P :D :)
ab khapa arrange ker k rakhi
  3 Comments
Brando Miranda
Brando Miranda on 26 Mar 2017
what if its a hist3 i.e. histogram in 2D

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!