adjustment of the histogram bar's thickness
Mostrar comentarios más antiguos
data=[-0.00044;0.01355;0.00755;0.00455;0.01555;0.01955;0.00555;0.00455;0.01755;0.01655];
figure;
hist(data)
%I need to reduce the bars thickness of histogram
Respuesta aceptada
Más respuestas (2)
Image Analyst
el 15 de Ag. de 2014
To make bars narrower or less thick, adjust the barwidth property between 0 and 1
bar(binCenters, binHeights, 'BarWidth', 0.3); % Narrow bars
bar(binCenters, binHeights, 'BarWidth', 1.0); % Widest possible bars
1 comentario
Chad Greene
el 15 de Ag. de 2014
It is possible for bars to be wider than 1.0.
y = randn(10000,1);
histf(y,'barwidth',1.5)
produces this:

To see it a bit more clearly (pun?), make the bars semitransparent:
y = randn(10000,1);
histf(y,'barwidth',1.5,'alpha',.5)

Chad Greene
el 14 de Ag. de 2014
0 votos
Categorías
Más información sobre Histograms en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!