label (annotate) bar graph

  • Follow


I want to annotate my bars with the corresponding experimental conditions, far example, I have three samples on the same day for 4 days. I put the sample number on the x-axis. Can I label the date above each bar? Does anybody know any function file doing that?

Thank you.
Wendy
0
Reply Wendy 1/5/2010 1:18:04 PM

"Wendy " <wlq121@gmail.com> wrote in message <hhve6c$aq6$1@fred.mathworks.com>...
> I want to annotate my bars with the corresponding experimental conditions, far example, I have three samples on the same day for 4 days. I put the sample number on the x-axis. Can I label the date above each bar? Does anybody know any function file doing that?
> 
> Thank you.
> Wendy

one of the many solutions

     x=rand(1,3);
     xd={'jun','jul','aug'};
     nx=numel(x);
     bar(x);
     set(gca,'ylim',[0,1.2],'xticklabel',xd);
     text(1:nx,repmat(1.1,1,nx),xd,...
          'horizontalalignment','center',...
          'fontsize',12,...
          'fontweight','bold');

us
0
Reply us 1/5/2010 1:26:02 PM


1 Replies
2503 Views

(page loaded in 0.026 seconds)

Similiar Articles:






7/22/2012 2:50:30 PM


Reply: