0

I want to enlarge the size of the axis labeling.

par(mar=c(1,1,1,1))

scatter3D(x = Eplot_sand.mean$OM, y = Eplot_sand.mean$rho_B, z = Eplot_sand.mean$Pv.mean,
                    phi = 20, theta = 35, bty = "b2",  type = "h",alpha = 0.8, clim =c(0,150),
                    ticktype = "detailed", pch = 19, cex = 1.2, clab = "Pv (kPa)",
                    xlab = "OM (%)",
                    revolutions=100,
                    zlab = "Pv (kPa)",
                    ylab = "bulk density (g cm-³)",
                    bg.col="black",
                    sphere.size=100,
                    xlim = c(0,5),
                    ylim = c(1,2),
                    zlim = c(0,150),
                    col = ramp.col(c("blue", "green","orange", "red")))

Thanks in advance!

Marco Sandri
  • 23,289
  • 7
  • 54
  • 58
  • Could you put together a reproducible example? Include some (perhaps fake) data in your question, along with the `library(...)` commands to load the package(s) you use. – user2554330 Aug 12 '21 at 12:54
  • sure, the loaded packages are: library(scatterplot3d), library(car), library(dplyr) unfortunately i dk how to insert the tabel with the data properly like in the edited question above. – soilscientist Aug 13 '21 at 11:33
  • None of those packages have a function named `scatter3D`. Are you using the `plot3D` package? To insert a dataframe named `df`, run `dput(df)` in your R session and copy the output into the question. – user2554330 Aug 14 '21 at 10:15

1 Answers1

1

Similarly to the limit command in your function (xlim etc), you can do a cex command for your label indicating the size of text be scaled relative to the default:

scatter3D(...,
          cex.lab=par("cex.lab"))

This is also slightly documented here: https://www.rdocumentation.org/packages/scatterplot3d/versions/0.3-41/topics/scatterplot3d

  • 1
    Your link is to a function from a different package, but your answer works. I think you want https://rdrr.io/cran/plot3D/man/scatter.html. – user2554330 Aug 14 '21 at 10:20