How to plot a histogram by hand
2 views (last 30 days)
Show older comments
Hi everyone, I have a question of drawing a histogram by hand. The data I have is
1) x = [0:9]
2) y = [6428901 2708498 1199394 725711 514369 188590 35629 5699 900 633]: the number of data in range of [0 1], [1 2], [3 4] ... [8 9].
I want to draw a figure like histogram because now I have had the distribution of data, the only I need to do is draw it. I have used function bar:
bar(x,y,'hist');
and I get the figure

But I want one column bar corresponding to a interval, e.g. [0 1] or [2 3] ..., and the beginning point must be 0 instead of a blank
Thank you in advance. Hope you can help me.
0 Comments
Answers (0)
See Also
Categories
Find more on Histograms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!