告诉 plot3D 库中的 scatter3D 绘制刻度标签

Telling scatter3D from plot3D library to plot the tick labels

我正在使用 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")

documentation中提到了参数:

...    arguments to be passed down

这些都传给了persp。那里指出 ticktype 默认为 'simple',但可以更改为 'detailed'。所以添加参数

ticktype= "detailed"

应该可以。希望这对您有所帮助!