2017-07-23 33 views
1

我正在使用plot3D庫的scatter3D函數做3D散點圖,但是我無法找到給出語法的方式,因此圖中包含刻度標籤。從plot3D庫告訴scatter3D以繪製刻度標籤

我的代碼如下:

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") 

enter image description here

你的建議將不勝感激。

回答

0

documentation,有說法一提:

... arguments to be passed down 

這些流傳下來的persp。在那裏它表明,ticktype默認爲'簡單',但可以改爲'詳細'。因此,添加參數

ticktype= "detailed" 

應該工作。希望這可以幫助!