Writes the values of bars in bar graphs, with options to rotate text, change how text is displayed, and ignore bars with a value of zero.
Ahora está siguiendo esta publicación
- Verá actualizaciones en las notificaciones de contenido en seguimiento.
- Podrá recibir correos electrónicos, en función de las preferencias de comunicación que haya establecido.
Adds the value of the bar on top of the bar for the active figure, ignoring
bars with a value of zero. Automatically pulls bar height data from the
figure. Accepts up to three variable arguments in any order:
rotation is the angle of the text (default zero)
textoption is the formatspec string (default '%.0f')
ignorezero is a logical indicating if bars with a value of zero are
labeled (default true)
Example usage:
bar([2 6 7])
h = barlabel
h =
Figure (1) with properties:
...
bar([3 98 65])
barlabel(false,45);
Labels all bars (including zeros) and rotates text 45 degrees
Citar como
Jackson Burns (2026). barlabel (https://github.com/JacksonBurns/MATLAB_barlabel), GitHub. Recuperado .
This function abstracted from this answer on MATLAB Answers: https://www.mathworks.com/matlabcentral/answers/351883-value-on-top-of-grouped-bar-graph#answer_277165
Información general
- Versión 1.0.2 (59 KB)
-
Ver licencia en GitHub
Compatibilidad con la versión de MATLAB
- Compatible con cualquier versión
Compatibilidad con las plataformas
- Windows
- macOS
- Linux
No se pueden descargar versiones que utilicen la rama predeterminada de GitHub
| Versión | Publicado | Notas de la versión | Action |
|---|---|---|---|
| 1.0.2 | Fixed title unintentionally changed in last version |
||
| 1.0.1 | Added link to GitHub repository. |
||
| 1.0.0 |
