我有两个问题。
到目前为止,我已经:
colorSet <- tim.colors(10)
z <- unique(data.set[,3])
something <- ??? Not sure if something should be done about this
scatterplot3d(data.set[,1], data.set[,2], data.set[,3], color=colorSet[something], pch=19)到目前为止(以伪代码表示),我有:
p1 <- scatterplot3d(etc)
col2 <- color for p2
p2$points3d(etc)我不太清楚如何使用xyz.convert和plane3d,因为我在网上阅读/搜索的内容似乎不适合我。:(
希望有人能帮忙!谢谢!
发布于 2014-07-15 13:39:10
由于data.set,3只有10个唯一值,所以我相信您可以简单地为z值设置一个“查找表”。
zu<-unique(data.set[,3])
zindex <- unlist(sapply(1:nrow(data.set), function(j) which(zu==data.set[j,3]))
scattterplot3D(data.set[,1],data.set[,2],data.set[,3],color=colorSet[zindex])我还没有测试,所以我可能已经犯规了一些指数。
https://stackoverflow.com/questions/24758236
复制相似问题