# NOT RUN {
cols <- expand.grid(x = seq(0, 1, length.out = 10),
y = seq(0, 1, length.out = 10),
z = seq(0, 1, length.out = 10))
mixed <- mixColor3Ramps(cols)
# }
# NOT RUN {
library(rgl)
plot3d(cols$x, cols$y, cols$z, col = mixed, pch = 15)
cols <- expand.grid(x = seq(0, 1, length.out = 10),
y = seq(0, 1, length.out = 10))
mixed <- mixColor2Ramps(cols)
# }
# NOT RUN {
plot(cols$x, cols$y, col = mixed, pch = 15)
# }
Run the code above in your browser using DataLab