简体   繁体   中英

R/rgl - How to move 3d axis labels?

(I am using rgl.) I am would like to move the axis labels in the following:

plot3d(1,2,3, xlab="x", ylab="y", zlab="z", xlim=c(-4,4), ylim=c(-4,4), zlim=c(-4,4))
abclines3d(x = matrix(0, ncol=3), a = diag(3), col="black", lwd=3)

To the positions shown:

红色箭头表示我希望标签位于x,y和z正轴旁边

Basically, I'd like the labels to be at the "ends" of the positive x, y, and z axes. How do I do this?

You could try something like this:

plot3d(1,2,3, xlab="", ylab="", zlab="", xlim=c(-4,4), ylim=c(-4,4), zlim=c(-4,4))
abclines3d(x = matrix(0, ncol=3), a = diag(3), col="black", lwd=3)
text3d(matrix(c(3,0.2,0.2,4,-6,4,0.1,0.1,3),ncol=3),texts=c('y', 'x', 'z'))

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM