[R] Issues with Legend symbols

beloitstudent schurrk at beloit.edu
Mon Sep 27 23:58:35 CEST 2010


Hello forum!
I am currently having trouble getting R to recognize one of my pch
characters.  Here's what I have:

legend(120, 40, c("SAL-arterial", "SAL-portal", "GLP-1-arterial",
"GLP-1-portal"), bty="n", col=c("black"), pch=19:15:21:22, pt.bg="white",
pt.cex=2:2:2:2, lty=1, lwd=2, text.col="black", cex=1.3)

Now, SAL-arterial and SAL-portal should be a black circle and square,
respectively.  GLP-1-arterial and GLP-1 portal should be a white circle and
square respectively.  

The error message I am getting is 
"Warning messages:
1: In 19:15:21 : numerical expression has 5 elements: only the first used
2: In 19:15:21:22 :
  numerical expression has 3 elements: only the first used"

The SAL-arterial, GLP-1-arterial, and GLP-1-portal all are correct, however,
SAL-portal is not recognized and a small, black circle is placed there
instead of the black square that it should be.
How do I get the legend to match my data?  Thanks in advance for your help!
-- 
View this message in context: http://r.789695.n4.nabble.com/Issues-with-Legend-symbols-tp2716308p2716308.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list