How to show y-values in a grouped bar-plot

1 view (last 30 days)
Patrick
Patrick on 23 Oct 2013
Hello everyone,
i have a problem with my grouped bar-plots. For each bar i want to find the min and max values with the code below:
imin = find(min(y) == y); imax = find(max(y) == y); text(x(imin),y(imin),[' Minimum = ',num2str(y(imin))],... 'VerticalAlignment','bottom',... 'HorizontalAlignment','right',... 'FontSize',12) text(x(imax),y(imax),['Maximum = ',num2str(y(imax))],... 'VerticalAlignment','bottom',... 'HorizontalAlignment','left',... 'FontSize',12)
So far no problem, the values are correct but the problem is, all values are shown only in the last group of bars. Means the value for the first bar is shown in the last group of bars.
Does anyone know the problem and how to fix it?
Thanks for your help

Answers (0)

Community Treasure Hunt

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

Start Hunting!