Add pch symbol in R plot legend Add pch symbol in R plot legend r r

Add pch symbol in R plot legend


Try this. You set lty to display only first two lines, and pch to display only the last point.

plot(1:10, rnorm(10) * 1:10)legend("bottomleft", legend = c("entry1", "entry2", "something cpl different"), bty = "n",       lwd = 2, cex = 1.2, col = c("black", "blue", "red"), lty = c(1, 1, NA), pch = c(NA, NA, 8))

enter image description here