0

I'd like positioning the axes label with package plot3D. In my problem, the axes label are positioned very close to the graphic. I tried to use mtext, but it doesn't work in plot3D.

#Original version

    library(plot3D)
    x <- matrix(runif(10000), ncol = 100)
    par(mar=rep(0,4))
    plot3D::hist3D(z=x/sum(x), colkey=list(plot=FALSE), xlab = 'd1', ylab = 'd2', zlab = 'd3')

#My attempt to solve (It isn't work)

    x <- matrix(runif(10000), ncol = 100)
    par(mar=rep(0,4))
    plot3D::hist3D(z=x/sum(x), colkey=list(plot=FALSE), xlab = '', ylab = '', zlab = '')
    mtext('d1', side = 1, line = 3)
    mtext('d2', side = 2, line = 3)
    mtext('d2', side = 3, line = 3)
Werner Hertzog
  • 2,002
  • 3
  • 24
  • 36
Wagner Jorge
  • 430
  • 3
  • 15
  • Can you elaborate: what was unsatisfactory and how would you like your axis titles positioned? Also your "modified version" code is missing the closing apostrophes around d1, d2 and d3. – jruf003 Aug 23 '17 at 05:40
  • 1
    You can use `mtext3d` – Rodrigo Apr 26 '18 at 20:43

0 Answers0