barplot + plot. Base R only.
Goal
Run every block and confirm the chart is visible.
par(mfrow = c(1, 2))
barplot(c(12, 15, 15, 18, 21), horiz = TRUE, names.arg = c("Eldoret", "Mombasa", "Kisumu", "Nakuru", "Nairobi"), main = "Ranked", col = "#0f6b52")
plot(1:4, c(48, 55, 92, 150), type = "b", main = "Nairobi rain")
par(mfrow = c(1, 1))
print("practice")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("practice")