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

1 view (last 30 days)
*
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*

Answers (1)

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

Categories

Find more on Environment and Settings in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!