[R] filed plot symbols

Dermot MacSweeney dsweeney at nmrc.ucc.ie
Tue Oct 17 17:13:51 CEST 2000


As a follow on to Bill's question, if we look at the example which he gives, the 
legend will have lines going through the empty symbols. If there any way to 
prevent this aside from the obvious (only use filled symbols in graphs).


------------- Begin Forwarded Message -------------

X-Authentication-Warning: localhost.localdomain: wsimpson owned process doing 
-bs
Date: Tue, 17 Oct 2000 10:57:36 +0100 (BST)
From: Bill Simpson <wsi at gcal.ac.uk>
X-Sender: wsimpson at localhost.localdomain
To: r-help at stat.math.ethz.ch
Subject: [R] filed plot symbols
MIME-Version: 1.0

This example,

x<-1:10
y1<-x
y2<-x+2
plot(x,y1,pch=21,ylim=range(c(y1,y2)),type="o",lty="solid",bg="white")
points(x,y2,pch=22,type="o",lty="dashed",bg="white")
legend(7,3,legend=c("y1","y2"),pch=c(21,22),lty=c("solid","dashed"),bg="white")

works if I use pch = one of 21-25. But if I use pch= one of 0-6, it
doesn't work: the line goes through the empty symbols (instead of
the symbols appearing solid).

I was just curious why this is set up this way. Symbols 21-25 just seem to
repeat some others (e.g. 21 and 1 are both circles), except that the early
ones are not fillable with the bg="white" trick. I wonder why not just
remove the existing symbols 1-6 and replace them with the 21-25
counterparts. (There probably is a good reason why it is set as it is)

Bill

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

------------- End Forwarded Message -------------


**************************************************************

Dermot MacSweeney			NMRC, 
Email: dsweeney at nmrc.ucc.ie		Lee Maltings, 
Tel: +353 21 904178			Prospect Row, 
Fax: +353 21 270271			Cork, 
WWW: http://nmrc.ucc.ie			Ireland

**************************************************************


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list