wesea 发表于 2012-4-3 09:04 
好厉害~
如果我有3个不同的图片 想把他们合并在一起 那用R的什么命令呢? 还是不用R直接在ppt上合并呢?
如果只是用到function contour()
比较简单,只要加入par(mfrow = c(1,3))
如下代码:
library(MASS)
data=read.csv("2dplot.csv")
x=data$labor.gdp
y=data$capital.gdp
xy.kde <- kde2d(x,y, n = 100)
par(mfrow = c(1,3))
####1st
contour(xy.kde, xlim = c(0, 0.07), ylim = c(0, 15),col = "red")
points(x,y, pch = 20, cex = 0.6)
####2nd
contour(xy.kde, xlim = c(0, 0.07), ylim = c(0, 15),col = "blue")
points(x,y, pch = 20, cex = 0.6)
####3rd
contour(xy.kde, xlim = c(0, 0.07), ylim = c(0, 15),col = "orange")
points(x,y, pch = 20, cex = 0.6)
######
但因程序有用到function filled.contour()
filled.contour is actually a combination of two plots;
one is the filled contour and one is the legend.
filled.contour()用到function layout()
可想而知layout必须重新计算,比较麻烦,
所以方便的话,就请你在PPT直接完成.