我正在使用 plot3D 库的 scatter3D 函数绘制 3D 散点图,但我找不到给出语法的方法,以便绘图包含刻度标签。
我的代码如下:
library(plot3D)
A <- c(0, 1, 0, 1)
B <- c(0, 0, 1, 1)
y <- c(52, 74, 62, 80)
scatter3D(x = A, y = B, z = y, col = "red", phi = 0, cex = 2, bty = "g", alpha = 0.5 , pch = 20, nticks = 10,
xlab = "Time Factor", ylab = "Corn Factor", zlab = "Outcome", main = "Experiment with 2 Factors")