Please allow time for visualization to load. 3D interactive scattplot. You can zoom in and out, and drag with the mouse. This may not work on mobile. I am comparing 3 variables from the mtcars dataset in .

## Loading required namespace: mgcv

You must enable Javascript to view this page properly.

stackover flow resource

initial inspiration

connect with me on linkedin

miles_per_gallon <- as.numeric(mtcars$mpg)
horse_power <- as.numeric(mtcars$hp)
displacement <- as.numeric(mtcars$disp)

next3d()
scatter3d(displacement, horse_power, miles_per_gallon, horse_power,surface = FALSE, groups = as.factor(mtcars$cyl), ellipsoid = TRUE, surface.col = c("#600473", "#005995", "#fa625f"))

You must enable Javascript to view this page properly.