I use code and successfully complete the figure. But the problem is that in X-axis, all the year is missing, showing only 3 of them just like the image.
My code was :slight_smile
plot(d1$Year, d1$POC, type ="l",xlab="Year", ylab = bquote("POC (" ~ mgm^-3 ~ ")"), col="blue")
par(new = TRUE)
plot(d2$Year, d2$Chl_a, type ="l", xaxt = "n", yaxt = "n",
ylab = "", xlab = "", col = "red", lty = 2)
axis(side = 4)
mtext(expression(paste(Chl-a (mgm^-3))), side = 4, line = 3)
legend("topright", c("POC", "Chl-a"),
col = c("blue", "red"), lty = c(1, 2))
Is there any correcetion needed for visualizing all the year remain in the data