hue histogram color map
5 views (last 30 days)
Show older comments
Hi
I am trying to plot the hue histogram of my image. It currently looks like this.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/153581/image.png)
I would like it to look like the one below.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/153582/image.png)
Or at least just the bar below should be in color. I tried changing the colormap option but nothing changed. Help thanks !
0 Comments
Answers (2)
Walter Roberson
on 26 Jan 2016
[ind, map] = rgb2ind(YourRGBImage);
imhist(ind, map)
4 Comments
Walter Roberson
on 27 Jan 2016
I don't think you can do it with imhist() then. You will probably need to bar() each different bar separately.
Image Analyst
on 27 Jan 2016
See attached demo where I change each bar individually. Feel free to adapt.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/172574/image.jpeg)
0 Comments
See Also
Categories
Find more on Histograms in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!