I’m trying to draw a legend in R that has three different point styles, all with two-digit pch values. I’ve escpated each value with a backslash, but R isn’t reading that correctly and I can’t figure out the correct syntax. Below is a toy example, along with the output graph. This syntax works fine with single-digit pch values. What’s the secret for properly escaping two-digit pch values?
y1 = 1:10
y2 = rep(5,10)
y3 = seq(3.5,4.4,.1)
x = 1:10
plot(x,y1, pch=19, lty=1, type="b", ylab="")
lines(x,y2, pch=15, lty=2, type="b", col="red")
lines(x,y3, pch=17, lty=3, type="b", col="blue")
legend(1,10,
c("Y1","Y2","Y3"),
lty=c(1,2,3),
pch=c("\19\15\17"),
col=c("black","red","blue"))

As Joran said in his comment, just do
pch=c(19,15,17).