|
I could to with some help.
I have created a function which creates a number of subplots based on a user selection.
The subplots are bar graphs.
The y axis is normalised data.
The x-axis is is the observations.
I would like to place a text box with the absolute vaue on top of each bar graph.
Because the bar gaphs are varying height I don't know how to calculate the position of the textbox. Once the position is calculate how do code the reference to the absolute value to put in the text box?
Below is the code to generate the subplots.
for i=1:NPlotsWanted
subplot(x,y,i),bar(cell2mat(store(2:end-1,ave_index(i)+1)));
xlabel('Month','fontsize',8);
ylabel('Normalised DTC count per month','fontsize',8);
axis([0 noOfDatas+1 0 0.05]);
legend(store(1,ave_index(i)+1),'location','NorthOutside','FontSize',8);
set(gca,'XTickLabel', months); % labels Xticks with months.
end
Thanks, Gunny
|