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)
if (FALSE) {
if(requireNamespace("rgl", quietly = TRUE)) {
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)
if(requireNamespace("graphics", quietly = TRUE)) {
plot(cols$x, cols$y, col = mixed, pch = 15)
}
}
Run the code above in your browser using DataLab