How to insert values on top of Each bar in Matlab also with names on x-axis.

1 visualizzazione (ultimi 30 giorni)
*
with this code I am getting grouped bars with names on x-axis. now I would like to show the values of each bar on top of it, same like Excel*

Risposte (1)

Thorsten
Thorsten il 5 Lug 2016
Modificato: Thorsten il 5 Lug 2016
Use
text(x, value, num2str(value))
and find out the appropriate values for x, and use 'VerticalAlignment', 'top' for negative values.

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by