Skip to content
Prev 171958 / 398503 Next

add absolute value to bars in barplot

On Fri, Feb 27, 2009 at 01:32:45PM +0100, soeren.vogel at eawag.ch wrote:
barplot() returns a vector of midpoints so you can use text() to add the
annotation. There is an example in the manual page of barplot:

mp <- barplot(VADeaths)
tot <- colMeans(VADeaths)
text(mp, tot + 3, format(tot), xpd = TRUE, col = "blue")

cu
	Philipp