library(plotrix) m<-t(read.csv("", row.names=1, sep=",")) games<-as.numeric((m[,1])) color<-rep(rgb(.7,.7,.7,.7), nrow(m)) # The fourth ".7" is for opacity color[games > 3]<-rgb(1,0,0,.7) # Teams that made it into knockout rounds will be red plot(cbind(as.numeric(m[,2]) / games, as.numeric(m[,12]) / games), cex=as.numeric(m[,1]), pch=21, col=rgb(0,0,0,.5), lwd=2, bg=color, main="Goals, fouls, and games in the 2010 World Cup", ylab="Fouls per game", xlab="Goals per game") mtext("Red = advanced from group; circle size corresponds to games played", padj=-1) labels<-rownames(m) labels[games < 4]<-"" # Not showing the labels for teams that didn't advance past group thigmophobe.labels(goals.per.game, fouls.per.game, labels, cex=.7) # Place labels