Wednesday, 15 May 2013

3D plot of two variables z1 and z2 which are depending on x and y data in R -



3D plot of two variables z1 and z2 which are depending on x and y data in R -

i pretty new plotting 3d graphs in r. can work on scatter plot in 2d.

here showing z1 assumption of data. in reality z2 exists.

i have dataset like:

x y z1 10 8017 5.238290 13 8273 5.368710 15 9500 5.908030 17 6856 6.501010 19 8453 7.319200 20 4517 6.258901 21 7095 5.781290 24 7738 6.979810 25 8561 6.563700 26 7111 6.636700 29 9596 9.374410

how can plot a along x axis, b along y axis , z1 along z axis? how can form bar 3d, mesh 3d , patch 3d ?

i did seek on surface3d , plot3d got error in handling data.

please help on this.

the plot3d command produces plot of no use. , type not working within command alter shape (giving blank plot page).

b <- read.table("dataset", header = t) plot3d(b$x, b$y, b$z, xlab="x", ylab="y", zlab="z", col=rainbow(1000))

instead of scattered points of z1 along x , y, i'd z1 shown 3d bars.

and surface3d throwing error

"error in rgl.surface(x = c(10l, 13l, 15l, 17l, 19l, 20l, 21l, 24l, 25l, : y length != x rows * z cols"

my info combined dataset , accessing separate column surface3d command don't have clue else need do.

r plot 3d

No comments:

Post a Comment