Setting the margins in scatter3D from plot3D package in R

Viewed 992

I am creating a 3D scatter plot using the scatter3D function from the plot3D library. My problem is that I can not set the margins around the plot. More specifically I need more space at the bottom. I used both the arguments mai and mar suggested in the documentation but they have no effect. My code is the following:

library(plot3D)

C <- c(-1, 1, -1, 1, -1, 1, -1, 1)

T <- c(-1, -1, 1, 1, -1, -1, 1, 1)

S <- c(-1, -1, -1, -1, 1, 1, 1, 1)

O <- c(5, 30, 6, 33, 4, 3, 5, 4)

scatter3D(x = C, y = T, z = S,  col = "red", phi = 0, cex = O, bty = "g", alpha = 0.5 , pch = 20, nticks = 5,
          xlab = "Chemical", ylab = "Temperature", zlab = "Speed", main = "Experiment with 3 Factors",
          ticktype= "detailed", mai = c(1, 0.1, 0.1, 0.1) , mar = c(10, 4, 4, 2) + 0.1)

enter image description here

1 Answers
Related