0

我想用包 plot3D 定位轴标签。在我的问题中,轴标签的位置非常靠近图形。我尝试使用mtext,但它在 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)
4

0 回答 0