
上QQ阅读APP看书,第一时间看更新
3D visualization with the plot3d package
The plot3d package can be used to generate stunning 3-D plots in R. It can generate an interesting array of plots, but in this recipe we will focus on creating 3-D scatterplots. These arise in situations where we have three variables, and we want to plot the triplets of values on the x-y-z space.
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.