I need help to plot a trivariate data
If I have three variables (x,y,z) and another variable f(x,y,z) how I can visualise them like presenting all possible slices and present each value of f(x,y,z) on each cell
this is a sample of my results
X , Y , Z , f(x,y,z)
0 , 0 , 0 , 0.7186750606557863
0 , 0 , 1 , 0.1816545219749217
0 , 0 , 2 , 0.1325766227290934
0 , 0 , 3 , 0.148513111388832
0 , 0 , 4 , 0.1215885009152961
0 , 0 , 5 , 0.2159501472892012
0 , 0 , 6 , 0.04605873415965471
0 , 0 , 7 , 0.1356269218857206
0 , 0 , 8 , 0.257822547019855
0 , 0 , 9 , 0.1914359947246274
0 , 0 , 10 , 0.2325336254052311
0 , 0 , 11 , 0.2053227931342235
0 , 0 , 12 , 0.2090946039028279
0 , 0 , 13 , 0.3491765529107006
0 , 0 , 14 , 0.1214783354308278
0 , 0 , 15 , 0.1715156020994479
0 , 0 , 16 , 0.3727796332918811
0 , 0 , 17 , 0.3290024642878383
0 , 0 , 18 , 0.1980557215900901
0 , 0 , 19 , 0.6611507752039599
or If you have any way to viualise it please help.
I tried a pakcage called plot3D but it didnt work
x <- X[,1]
y <- X[,2]
z <- X[,3]
grid <- mesh(x, y, z)
colvar <- with(grid, X[,4])
default is just the panels
slice3D (x, y, z, colvar = colvar, theta = 60)
and it gives this error “Error in addslice(NULL, x, y, z, colvar, xs = xs, ys = ys, zs = zs, plist = plist, :
‘colvar’ has to be an array of dimension 3” I tried to solve it but I cannot
I found another way that plots multiple surface
https://plotly.com/r/3d-surface-plots/#2d-kernel-density-estimation
but I couldnt understand it to use it also it just present some selective slices not all of them and not presenting the f(x,y,z)
Tag is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.