I have some data points such as:
1.342 0.1839 1.1 2.210
and I want to generate a vector that has
0-1: red
1-2: green
2-3: blue
因此,这一媒介就是:
red green green blue
这样,我就可以有色人种,各点将根据我的数据点的价值观加以划分。
这里是令人厌恶的事例。 一些狗是黑人:
library(rgl)
library(Rcmdr)
x <- c(1:10)
y <- c(2,4,5,1,8,4,6,2,3,1)
z <- c(3,6,1,7,8,3,5,5,7,9)
c <- c(0.1, 0.2, 1.2, 1.8, 2.4, 1.2, 0.6, 0.6, 1.3, 2.1)
cols <- cut(c, breaks=c(0, 1, 2, 3), labels=c("red", "green", "blue"))
scatter3d(x,y,z,residuals=F,fit=NA,point.col=cols)