Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!n4g2000vba.googlegroups.com!not-for-mail
From: vedenev <vedenev.maxim@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Automatically position annotation on bar graph
Date: Fri, 19 Jun 2009 01:56:44 -0700 (PDT)
Organization: http://groups.google.com
Lines: 13
Message-ID: <b31932b8-8381-4a9c-9f12-c0a0d35d1e45@n4g2000vba.googlegroups.com>
References: <h1e788$bsp$1@fred.mathworks.com>
NNTP-Posting-Host: 89.251.107.20
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1245401804 792 127.0.0.1 (19 Jun 2009 08:56:44 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 19 Jun 2009 08:56:44 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: n4g2000vba.googlegroups.com; posting-host=89.251.107.20; 
	posting-account=4kIhLQoAAAA5O3xkqw3S1hEVU2lwNKQO
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.11) 
	Gecko/2009060215 Firefox/3.0.11,gzip(gfe),gzip(gfe)
Bytes: 1495
Xref: news.mathworks.com comp.soft-sys.matlab:548859


Use text function. Aslo you can get bar object hendle. See example:

h=bar([1 2 3]);
x=get(h,'Xdata');
y=get(h,'Ydata');
for xc=1:length(x)
    text(x,y+0.2,['y=' num2str(y)]);
end

---------------------------------------------
Physics teacher toolbox for Matlab project:
http://physics-toolbox.tripod.com/
vedenev@ngs.ru