【发布时间】:2015-07-21 14:14:30
【问题描述】:
我正在使用 scatterplot3d 生成多个绘图,并且我希望在每个绘图中保持比例一致(我试图显示随时间的变化,所以这是必不可少的)。我当前的代码如下(绝不优雅,因为我是初学者!):
library(scatterplot3d)
file<-read.csv("DAY2.csv")
axis1<-file$axis1
axis2<-file$axis2
axis3<-file$axis3
s3d <- scatterplot3d(axis1, axis2, axis3)
colors <- c("#9900FF", "#E69F00", "#339900", "#0000FF")
colors <- colors[as.numeric(file$treatment)]
s3d <- scatterplot3d(file[,1:3], pch = 16, color=colors, xlab =
"Axis 1", ylab = "Axis 2", zlab = "Axis 3")
legend(s3d$xyz.convert(0.4, 0.4, -0.1), col= c("#9900FF", "#E69F00",
"#339900", "#0000FF"), bg="white", lty=c(1,1), lwd=2, yjust=0,
legend = c("high perf", "low perf"), cex = 0.7)
是否可以指定坐标轴范围以保持绘图之间的一致性?我已经检查了小插图,但里面没有这方面的信息。
提前致谢,
乔
【问题讨论】: