1.SAS的G3D语句,其语法:
PROC G3D <DATA=input-data-set>
<ANNOTATE=annotate-data-set>
<GOUT=<libref.>output-catalog>;
PLOT plot-request</option(s)>; |
SCATTER plot-request</option(s)>; |
例如:
proc g3d data=sashelp.iris; scatter PetalLength*PetalWidth=SepalLength; run; quit;
2.我们可以利用R的相关包来作3D图,例如scatterplot3d包
require(scatterplot3d)
s3d <- scatterplot3d(iris, type = "h", color = "blue")
my.lm <- lm(iris$Sepal.Length ~ iris$Petal.Length + iris$Petal.Width )
s3d$plane3d(my.lm)