[R] How do I get a character and a symbol in a legend

Lauri Nikkinen lauri.nikkinen at iki.fi
Wed Jan 23 19:11:14 CET 2008


Perhaps:

plot(1:10,1:10,type="n")
points(1:5,1:5,pch="+")
points(6:10,6:10,pch=20)
legend(5,5, c("A","B"), pch=c("+", NA))
legend(5,5, c("A","B"), pch=c(NA, 20))

-Lauri



More information about the R-help mailing list