Colunas: Altura, Peso, Ataque, Defesa, HP, Velocidade.
library(fmsb)
Pokemons <- data.frame(Altura = c(11, 0, 7, 6, 4, 11),
Peso = c(320, 0, 69, 85, 60, 320),
Ataque = c(55, 0, 49, 52, 55, 45),
Defesa = c(50, 0, 49, 43, 40, 50),
HP = c(60, 0, 45, 39, 35, 60),
Velocidade = c(90, 0, 45, 65, 90, 70),
row.names = c("max", "min", "Bulbasaur", "Charmander",
"Pikachu", "Butterfree"))
colors_fill <- c(scales::alpha("blue", 0.1),
scales::alpha("red", 0.1),
scales::alpha("gold", 0.2),
scales::alpha("green", 0.2))
colors_line <- c(scales::alpha("blue", 0.9),
scales::alpha("red", 0.9),
scales::alpha("gold", 0.9),
scales::alpha("green", 0.9))
radarchart(Pokemons,
seg = 7,
title = "Gráfico de radar dos Pokemons",
pcol = colors_line,
pfcol = colors_fill,
plwd = 4)
# Add a legend
legend(x=0.6,
y=1.35,
legend = rownames(Pokemons[-c(1,2),]),
bty = "n", pch=20 , col = colors_line, cex = 1.05, pt.cex = 3)
