我试图创建一个包含3个不同数据集的散点图,其中只有z值不同。这意味着我的x-y坐标是相同的,但z坐标是不同的。
3D Plot
library(scatterplot3d)
s3d6=scatterplot3d (Mainjib, # x axis
Knucklejib, # y axis
Sigma_section6, # z axis
color="blue", pch=19, # filled blue circles
type="h", # lines to the horizontal plane
xlab="Hovedbom V.[Grader]",
ylab="Knekkbom V.[Grader]",
zlab="Spenning [N/mm2]")
s3d.coords <- s3d$xyz.convert(Mainjib, Knucklejib, Sigma_section6)
text(s3d.coords$x, s3d.coords$y,
labels=row.names(Log.Mat_Sec6),
cex=.5, pos=4)
par(new=TRUE)
library(scatterplot3d)
s3d9=scatterplot3d (Mainjib, # x axis
Knucklejib, # y axis
Sigma_Section9, # z axis
color="red", pch=19, # filled red circles
type="h", # lines to the horizontal plane
xlab="Hovedbom V.[Grader]",
ylab="Knekkbom V.[Grader]",
zlab="Spenning [N/mm2]")
s3d.coords <- s3d$xyz.convert(Mainjib, Knucklejib, Sigma_Section9)
text(s3d.coords$x, s3d.coords$y,
labels=row.names(Log.Mat_Sec9),
cex=.5, pos=4)
这在某种程度上有效,但x轴和z轴会出现问题,如图所示。我还想在情节中添加另一组数据,但我不知道该怎么做,如果有人可以帮助我会很高兴。 最好的蠢货 ![Bugged axis] [1]