を使用してバーに値を書き込む方法はmtext
?
# Grouped Bar Plot
counts <- table(mtcars$vs, mtcars$gear)
barplot(counts, main="Car Distribution by Gears and VS",xlab="Number of Gears", col=c("darkblue","red"),legend = rownames(counts), beside=TRUE, horiz=TRUE)
mtext(counts ) # But position is not at each bar.
各棒グラフに対応する値を配置するにはどうすればよいですか?