如何在一张图中为我的 3 个图拟合一条线性回归线?

How can I fit one linear regression line in one graph for my 3 plots?

我在 R 中遇到问题,我需要一些 help.I 想要在我创建的具有 3 个不同绘图的图表中拟合线性进展线,但我找不到正确的代码。对于三个单独的线性进展线,我的 3 个地块中的每一个,我都没有问题......但是对于我所有 3 个地块的总线性进展线,我找不到有用的东西。任何形式的帮助将不胜感激...这是我的代码:

plot(Age ,Depth, type="l", xlim= rev(c(min_x, max_x)), ylim= rev(c(min_y, max_y)), 
           col= "red", xaxt='n',  yaxt='n', xaxs="i", yaxs="i", xlab=NA, ylab=NA)
lines(Age1, Depth1, col="dark green")
lines(Age2, Depth2, col="blue")
axis(side= 3)
axis(side= 4, las=2)
mtext(side=3, line=2.3 , "Age (Ma)")
par(mar = c(5, 4, 4, 8) + 0.2)
mtext(side=4, line=3 , "Depth (mcd)")
AgeAll   = c(Age, Age1, Age2)
DepthAll = c(Depth, Depth1, Depth2)
abline(lm(DepthAll ~ AgeAll))