Shamimur
Shamimur

Reputation: 1

Adding grid in a 3D scatter plot in R

In this code, the function addgrids3d is not working. It says, "could not find addgrids3d function". What can be the issue here?

EOS <- read.table(file = "clipboard", 
                      sep = "\t", header=TRUE)
install.packages("scatterplot3d") # Install
library("scatterplot3d") # load
EOS$Load[which(EOS$Load == 2)] <- '2N'
EOS$Load[which(EOS$Load == 7)] <- '7N'
shapes = c(14:15)
shapes <- shapes[as.factor(EOS$Load)]
s3d <- scatterplot3d(EOS[,1:3],angle = 40, cex.lab=1, cex.axis = .5,pch = shapes, color = "steelblue", grid = TRUE, type = "h", col.axis = "blue", col.grid = "light grey")
addgrids3d(EOS[, 1:3], grid = c("xy", "xz", "yz"))
my.lmEOS <- lm(EOS$Compression ~ EOS$Speed+EOS$Stress)
s3d$plane3d(my.lmEOS, col = "red", )
summary(my.lmEOS)

Upvotes: 0

Views: 12

Answers (0)

Related Questions