现在的位置: 首页 > 综合 > 正文

proc g3d VS scatterplot3d (R)

2018年10月21日 ⁄ 综合 ⁄ 共 430字 ⁄ 字号 评论关闭

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)

抱歉!评论已关闭.