我有两组散点图。我想使用 smoothScatter() 但似乎 add 函数不起作用,我想对两种分布都使用分离的颜色。例如:
X1<-rnorm(1000, mean = -2, sd = 1) Y1<-rnorm(1000, mean = -2, sd = 1)
X2<-rnorm(1000, mean = 2, sd = 1) Y2<-rnorm(1000, mean = 2, sd = 1)
smoothScatter(X1,Y1,col="green",colramp=colorRampPalette(c("white", "green"))); smoothScatter(X2,Y2,col="green",colramp=colorRampPalette(c("white", "red")),add=T);
可能吗 ?