##Example data to illustrate problem:
type=c("grp1","grp2","grp1","grp3","grp3","grp3","grp4")
num=c(1,1,2,4,3,5,1)
cols=c(rep("red",5),"green","red")
library(lattice)
bwplot(num~type)
par(new=T)
stripplot(num~type,col=cols)
我喜欢箱线图显示的附加信息,但我需要条形图中彩色点传达的信息。显然 par(new=T) 不起作用,那么如何将这些点叠加到箱线图上呢?