Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/80.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用R中的package plot3d个性化三维打印_R_Grid_Plot3d - Fatal编程技术网

使用R中的package plot3d个性化三维打印

使用R中的package plot3d个性化三维打印,r,grid,plot3d,R,Grid,Plot3d,我想通过添加完整的网格并插入灰色背景来个性化我的plot3d。另外,我想把标签放在缩放轴的中间。我无法使用grid()函数添加网格。这是我重复的例子: # Helix x1 <- c(1,1) y1 <- c(1,1) z1 <- c(1,2) # Monopulse x2 <- c(1,3) y2 <- c(1,2) z2 <- c(1,1) # Smart Shelf x3 <- c(1,5) y3 <- c(1,5) z3 <

我想通过添加完整的网格并插入灰色背景来个性化我的
plot3d
。另外,我想把标签放在缩放轴的中间。我无法使用
grid()
函数添加网格。这是我重复的例子:

# Helix
x1 <- c(1,1) 
y1 <- c(1,1)
z1 <- c(1,2)

# Monopulse
x2 <- c(1,3) 
y2 <- c(1,2)
z2 <- c(1,1)

# Smart Shelf
x3 <- c(1,5) 
y3 <- c(1,5)
z3 <- c(1,5)

# Phased system
x4 <- c(1,2) 
y4 <- c(1,2)
z4 <- c(1,4)

rgl.bg(color = "gray")
grid <- expand.grid(x=x, y=y)
plot3d(x1, y1, z1, cex=1.5, size=4, type="l",col="red",lty=2,    xlab="Cost",ylab="Time",zlab="Space")
plot3d(x2, y2, z2, cex=1.5, size=4, type="l",col="blue",add=TRUE)
plot3d(x3, y3, z3, cex=1.5, size=4, type="l",col="green",add=TRUE)
plot3d(x4, y4, z4, cex=1.5, size=4, type="l",col="orange",add=TRUE)
aspect3d(1,1,1)
legend3d("topright", legend = c('Single beam', 'Narrow beam', 'Multibeam','Phased beam'), pch = 16, col = c("red","blue","green","orange"), cex=1, inset=c(0.02))
snapshot3d(filename = '3dplot.png', fmt = 'png')
螺旋线
x1 grid3d(),是的,grid3d可以工作。谢谢如何将标签移动到轴的中心?