This is my current code:
ggplot(data, aes(`left amplitude`)) +
stat_bin(aes(y=..density..), breaks = seq(min(data$`left amplitude`), max(data$`left amplitude`), by = .1), color="white") +
geom_line(stat="density", size = 1) +
scale_y_continuous(labels = percent, name = "percent") +
theme_classic()
and I get a result as
But I need a normal curve more like this but remain y-axis with Percentage not Density.
Any suggestions?