How about this code written by Jim Lemon?
concat.text<-function(x,y,txt,col) {
thisx<-x
for(txtstr in 1:length(txt)) {
text(thisx,y,txt[txtstr],col=col[txtstr],adj=0)
thisx<-thisx+strwidth(txt[txtstr])
}
}
plot(0,xlim=c(0,1),ylim=c(0,1),type="n")
ctext<-c("Roses are ","red, ","violets are ","purple")
concat.text(0,0.5,ctext,col=c("black","red","black","purple"))
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…