Is there any way for me to smoothen this curve [attached below], and not just connecting the points? I've tried using geom_smooth, but it doesn't seem to provide me what I am looking for. I attached my code below.
energy <- c("Orbital 1 Energy" = "firebrick", "Orbital 2 Energy" = "steelblue")
ggplot(Data, aes(x = BondLength)) +
geom_line(aes(y = TotalEnergy, color = "Orbital 1 Energy"), size = 1.5) +
geom_line(aes(y = Orbital2, color = "Orbital 2 Energy"), size = 1.5) +
labs(x = "Bond Length (Angstrom)",
y = "Energy (Hartree)",
color = "Legend") +
scale_color_manual(values = energy)
Picture:
Or is there no other way but to just include many data points to create a smooth curve? Thank you!