I have made a density figure, the result should be like the blue line. However, when I turned to a similar dataset, the same code made the line like the pink one [![The right line should be like the blue one]
points(pCO2_clean$age_Ma, log(pCO2_clean$pCO2_vetted) , cex = 0.5, col = hsv(sc1, sc2/3, sc[3]))
tsdens.s(cp, “dodgerblue2”)
However, I made the line look serration, how could I make it more smoother?
For example, the data we can use to make an example.
data("Nile"); cp <- cbind(t = seq_along(Nile), outer(c(Nile), 200*c(-2, -1, 0, 1, 2), "+")); matplot(cp[,1], cp[,-1], type = "l")
1