x2<-data.frame(animal=c("Escorpiao","Serpente","Aranha","OutrosAnimais"),
total=c(8208,4944,4661,5834),
Porcentagem=c(34.71,20.91,19.71,24.67))
cores <- c("blue", "red", "green", "orange")
barplot(x2$total,
names.arg = x2$animal,
col = cores,
main = "Total de Animais por Tipo",
xlab = "Tipo de Animal",
ylab = "Total",
legend.text = x2$Porcentagem,
args.legend = list(title = "Porcentagem (%)"))