# NOT RUN {
# simple vector
x <- c(453, 44, 56, 34)
b <- barplot(x)
BarText(x, b, x)
# more complicated
b <- barplot(VADeaths, horiz = FALSE, col=hblue, beside = TRUE)
BarText(VADeaths, b=b, horiz = FALSE, beside = TRUE, cex=0.8)
BarText(VADeaths, b=b, horiz = FALSE, beside = TRUE, cex=0.8, top=FALSE,
col="white", font=2)
b <- barplot(VADeaths, horiz = TRUE, col=hblue, beside = TRUE)
BarText(VADeaths, b=b, horiz = TRUE, beside = TRUE, cex=0.8)
b <- barplot(VADeaths)
BarText(VADeaths, b=b)
b <- barplot(VADeaths, horiz = TRUE)
BarText(VADeaths, b=b, horiz = TRUE, col="red", cex=1.5)
# }
Run the code above in your browser using DataLab