March 2019
Beginner to intermediate
448 pages
13h 14m
English
We will generate a dataset containing random gaussian numbers for three variables, and we will plot them into the same plot using the plot3d package.
library(plot3D)
x = rnorm(100)y = rnorm(100)z = x + y + rnorm(100,0,0.3)idrow = 1:100
scatter3D(x, y, z, bty = "g", colkey = TRUE, main ="x-y-z plot",phi = 10,theta=50)text3D(x, y, z, labels = idrow, add = TRUE, colkey = FALSE, cex = 0.5)
The following screenshot is the resulting 3D plot:

Read now
Unlock full access