Skip to content
Prev 303128 / 398503 Next

How to add values on bar of groouped bar plot using mtext?

On 11.08.2012 04:55, Manish Gupta wrote:
Look at the output of barplot, it returns the locations:

bp <- barplot(counts, main = "Car Distribution by Gears and VS",
         xlab = "Number of Gears", col = c("darkblue", "red"),
         legend = rownames(counts), beside = TRUE, horiz = TRUE)
bp
mtext(side = 2, at = bp, text = counts)



Uwe Ligges