我可以使用scatterplot3d包手动旋转轴吗?

时间:2016-12-10 12:01:45

标签: r scatter3d

我在3D图中绘制了一个数据集和其他图和平面。 我想旋转轴并获得快照。

(1)我可以使用rgl包另外绘制点和平面吗? (2)我可以使用scatterplot3d包手动旋转轴吗? (我不需要电影。)

与scatterplot3d相比,rgl的清晰度相对较差,那么我想使用scatterplot3d。 enter image description here

for (i in 0:100){
  A <- seq(1.0,84.0,2)
  B <- 84.0-A
  C <- 650*i*1.0/100 - A
  result_z <- A/84.0
  result_x <- A/(A+C)
  result_x <- result_x*100
  result_z <- result_z*100
  exer <- cbind(result_x,result_z,i)
  exer2_hoge3 <- rbind(exer2_hoge3,exer)
}
par(xpd=T)
figure <-scatterplot3d(x = exer2_hoge3[,1], y = exer2_hoge3[,3], z = exer2_hoge3[,2], pch = 1, xlab = "xlab", ylab = "ylab", zlab = "zlab",cex.axis = 1.5, cex.lab = 2, xlim = c(100,0), ylim = c(0,100), zlim = c(0,100)
                       ,color = "gray15", mar = c(5,5,5,5), cex.symbols = 1.2
)

par(new = T)
scatterplot3d(y = 3800.0/650, x = 3400.0/38, z = 3400.0/84, pch = "1", cex.symbols = 2.5, xlab = "", ylab = "", zlab = "", color = "black",cex.axis = 1.5,xlim = c(100,0), ylim = c(0,100), zlim = c(0,100), mar = c(5,5,5,5))
par(new = T)
scatterplot3d(y = 6500.0/650, x = 5600.0/65, z = 5600.0/84, pch = "2", cex.symbols = 2.5, xlab = "", ylab = "", zlab = "", color = "black",cex.axis = 1.5,xlim = c(100,0), ylim = c(0,100), zlim = c(0,100), mar = c(5,5,5,5))
par(new = T)
scatterplot3d(y = 6700.0/650, x = 5700.0/67, z = 5700.0/84, pch = "3", cex.symbols = 2.5, xlab = "", ylab = "", zlab = "", color = "black",cex.axis = 1.5,xlim = c(100,0), ylim = c(0,100), zlim = c(0,100), mar = c(5,5,5,5))
par(new = T)
scatterplot3d(y = 7500.0/650, x = 7100.0/75, z = 6100.0/84, pch = "4", cex.symbols = 2.5, xlab = "", ylab = "", zlab = "", color = "black",cex.axis = 1.5,xlim = c(100,0), ylim = c(0,100), zlim = c(0,100), mar = c(5,5,5,5))
par(new = T)
scatterplot3d(y = 7900.0/650, x = 7600.0/79, z = 6300.0/84, pch = "6", cex.symbols = 2.5, xlab = "", ylab = "", zlab = "", color = "black",cex.axis = 1.5,xlim = c(100,0), ylim = c(0,100), zlim = c(0,100), mar = c(5,5,5,5))
figure$plane3d(95, x.coef = 0, y.coef = 0, lty.box = "dashed") 
##### yz_additional plane
x0 <- 89
xyz1 <- figure$xyz.convert(rep(x0, 6), rep(0, 6), seq(0, 100, by=20))
xyz2 <- figure$xyz.convert(rep(x0, 6), rep(100, 6), seq(0, 100, by=20))
segments(xyz1$x, xyz1$y, xyz2$x, xyz2$y, lty="dashed")
xyz1 <- figure$xyz.convert(rep(x0, 6), seq(0, 100, by=20), rep(0, 6))
xyz2 <- figure$xyz.convert(rep(x0, 6), seq(0, 100, by=20), rep(100, 6))
segments(xyz1$x, xyz1$y, xyz2$x, xyz2$y, lty="dashed")

0 个答案:

没有答案