How can I plot this small set as a beautiful histogram?
6 次查看(过去 30 天)
显示 更早的评论
I have a set of values which represent a statistic
x =
227 187 223 254 210 226 229 275 201 188 204 101 180
I am asked to present these values as a histogram. I know I am supposed to use the command histogram, but how do i make the height equal to each value and then add a name for each element?
0 个评论
回答(1 个)
Simon Allosserie
2021-2-26
You are not making a histogram if you want to have the height of the bars equal to the value. You are making a bar graph. This should be what you need:
https://nl.mathworks.com/help/matlab/ref/bar.html
2 个评论
Simon Allosserie
2021-2-26
You're welcome :) Can you vote my answer as the correct one to close this question? Thanks!
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Histograms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!