Two-colored symbols

No votes yet

The R plotting symbols pch=21:25 have borders and backgrounds. col gives the border color and bg the background color. (R version 2.8.x)

Example:

opar<-par(mar=c(0,0,2,0),oma=c(0,0,0,0))
plot(1:5,rep(1,5),col='blue',bg='red',pch=21:25,cex=4,
   lwd=2,axes=FALSE,xlim=c(0,6),ylim=c(0.5,1.5),
   main="two-colored symbols",xlab="")
text(1:5,rep(1,5),labels="21":"25")
par(opar)