[R] filed plot symbols

Bill Simpson wsi at gcal.ac.uk
Tue Oct 17 11:57:36 CEST 2000


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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list