slices <- c(10, 12,4, 16, 8) lbls <- c("US", "UK", "Australia", "Germany", "France") barplot(slices, names.arg= lbls, main="Bar Plot of Countries", col=rainbow(length(slices)))