首先,打开R软件,安装程序包scatterplot3d。代码: install.packages("scatterplot3d")
定义数据列。这里以R中的数据包trees为例,三个变量分别是Girth、Height、Volume。查看数据的代码如下:
> data(trees)
> trees
引用数据及程序包。
>attach(trees)
> library(scatterplot3d)
利用函数
scatterplot3d(Girth,Height,Volume)
温馨提示:答案为网友推荐,仅供参考