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

2008-01-23 Thread Lauri Nikkinen
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 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help P

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

2008-01-23 Thread Peter Dalgaard
steve wrote: > In the following snippet > > 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("+",20)) > > I want to get a legend with a "+" and a solid circle (pch=20). > However, what I get in the legend is "+" and "2". How can I get a "

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

2008-01-23 Thread Henrique Dallazuanna
Try: plot(1:10,1:10,type="n") points(6:10,6:10,pch=20) points(1:5,1:5,pch=3) legend(5,5, c("A","B"), pch=c(3,20)) On 23/01/2008, steve <[EMAIL PROTECTED]> wrote: > In the following snippet > > 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"),

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

2008-01-23 Thread steve
In the following snippet 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("+",20)) I want to get a legend with a "+" and a solid circle (pch=20). However, what I get in the legend is "+" and "2". How can I get a "+" and a solid circle? than