Text

text().

text(). Base R only.

Goal

Run every block and confirm the chart is visible.

barplot(c(21, 15, 15), names.arg = c("Nairobi", "Mombasa", "Kisumu"), ylim = c(0, 25), main = "Labels")
text(c(0.7, 1.9, 3.1), c(21, 15, 15) + 1, labels = c(21, 15, 15))
print("text")
barplot(c(21, 15, 15, 18, 12), names.arg = c("Nairobi", "Mombasa", "Kisumu", "Nakuru", "Eldoret"), col = "#0f6b52", main = "Units")
print("barplot")
set.seed(0)
hist(rpois(80, 12), main = "Units distribution", col = "#0f6b52", xlab = "units")
print("hist")
print("text")