How do I display the bin count of each bar at the top of each histogram bar?
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
jim scherr
am 11 Jul. 2018
Kommentiert: Thomas Lutz
am 25 Jan. 2023
I'm using the histogram function to display a histogram. How do I display the bin count of each bar at the top of each histogram bar?
0 Kommentare
Akzeptierte Antwort
KSSV
am 11 Jul. 2018
x = randn(10000,1);
h = histogram(x) ;
x = h.BinEdges ;
y = h.Values ;
text(x(1:end-1),y,num2str(y'),'vert','bottom','horiz','center');
box off
3 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Histograms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!