June 2016
Beginner to intermediate
1783 pages
71h 22m
English
In this recipe, we will learn how to create three-dimensional scatter plots that can be very useful when we want to explore the relationships between more than two variables at a time.
We need to install and load the scatterplot3d package in order to run this recipe:
install.packages("scatterplot3d")
library(scatterplot3d)Let's create the simplest default three-dimensional-scatter plot with our mtcars dataset:
scatterplot3d(x=mtcars$wt,
y=mtcars$disp,
z=mtcars$mpg)
That was easy! The scatterplot3d() functions much like the basic plot() function. In the preceding example, ...
Read now
Unlock full access