r - add line segments showing the error between points of scatter plot and grid of surface3d -


i'm new r, , i'm having trouble adding line segments showing error between points of scatter plot , grid of surface3d.

surface data

x <- c(0.001,0.0025,0.0039,0.0061,0.0095,0.0147,0.023,0.0358,0.0558,0.087,0.1357,0.2115,0.3296,0.5138,0.801,0.9999) y <- c(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1) z matrix 16 x 10 

scatterplot data:

           x1       y1      z1    1   25000.030   0.001218202 0.1915856    2   5118.15450  0.061169029 0.4711610    3   17005.82875 0.007177435 0.3222662    4   5300.22698  0.029688212 0.2770485  ...  (3000 rows)  

code used:

# function interleave elements of 2 vectors interleave <- function(v1,v2)as.vector(rbind(v1,v2)) # plot graph library(rgl) plot3d(scatterplot$x1, scatterplot$y1, scatterplot$z1, xlab="x",ylab="y",zlab="z", type="s", col = "blue", size=0.25, lit=false) surface3d(x,y,z,alpha=0.4,front="lines",back="lines") 

i combined surface3d() , plot3d() in graph. should go?


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -