¿Por qué geom_density me muestra valores superiores a 1 en el gráfico de densidad? ¿Cómo se puede cambiar a una fracción?
Y mi código utilizado para generar la trama
ggplot(data = input2, aes(x = r.close)) +
geom_density(aes(y = ..density.., fill = `Próba`), alpha = 0.3, stat = "density", position = "identity") +
xlab("y") + ylab("density") +
theme_bw() +
theme(plot.title=element_text(size = rel(1.6), face = "bold"),
legend.position = "bottom",
legend.background = element_rect(colour = "gray"),
legend.key = element_rect(fill = "gray90"),
axis.title = element_text(face = "bold", size = 13))
3 votos
geom_density(aes(y=..scaled..))