I have a 30 x 16 x 9 matrix that I would like to visualize via a 4-D plot in R.
I have tried scatter3D()
in packages plot3d
and scatterplot3d
.
x <- seq(10, 300, 10)
y <- seq(5.0, 20.0, 1.0)
z <- c(seq(0.5, 4, 0.5), 10)
scatter3D(x, y, z, colvar = data)
It always gives error saying that y
should have same length as x
.
How do I deal with this? Why do x
, y
, z
have to be equal length? This is so inconvenient.