Hi ! Urgent help needed. I have a grouped bar graph and i want to add text on the top of each bar in each group. I am doing this way:
y = [58.1395 62.7907; 40.3900 40.3400]Y=bar(y)str={'John'; 'Adam'};set(gca, 'XTickLabel',str, 'XTick',1:numel(str))labels= {'Physics', 'Chemistry'; 'Physics', 'Chemistry'};xt = get(gca, 'XTick');text(xt, y, labels, 'HorizontalAlignment','center', 'VerticalAlignment','bottom')
Am getting error "error using text Value must be a column or row vector in bar plot" and not able to fix it. Am working in R2015b. Help me.
Best Answer