谢谢你的回答! 对不起! 你的例子看起来类似于我想要的!
的颜色是: colfunc < - colorRampPalette(C( “darkblue”, “lightblue”)) colfunc(12)
2007:12条轮廓线(运行通过累积叶横型材) 甲样品:
dput(头(Profile07_6)) 结构(列表(X12 = C(427.89,427.89,427.93,427.96,427.98, 428),X11 = C(421.36,421.34,421.32,421.28, 421.22,421.18), X10 = c(415.81,415.6,415.44,415 ,X8 = c(380.04,379.85, 379.64,379.38,379.15,378.96),X7 = c(358.95,p = 0.0001),X9 = c(401.35, 401.23,401.11,400.94,400.78,400.7) 359.13,359.34, 359.56,359.78,359.99),X6 = c(348.31,348.52,348.68,348.83, 348.96,349.11)),.names = c(“X12”,“X11”,“X10”,“X9 ”, “X8”, “X7”, “X6”),row.names = C(NA,6L)中,class = “data.frame”)
的时候,图形看起来像这样
par(tcl=0.5)
matplot(Profile07_6, type = "l", lty = 1, col = colfunc(7), ylim=c(290,440),
ylab = "m asl", xlab="Distance along crossprofile [m]", main ="2007")
par(tcl=0.5)
minor.tick(ny=5, nx=2, tick.ratio=0.5)
abline(h=350, lty=3, col="grey33")
abline(h=400, lty=3, col="grey33")
abline(h=300, lty=3, col="grey33")
abline(h=290, lty=3, col="grey")
abline(h=310, lty=3, col="grey")
abline(h=320, lty=3, col="grey")
abline(h=330, lty=3, col="grey")
abline(h=340, lty=3, col="grey")
abline(h=360, lty=3, col="grey")
abline(h=370, lty=3, col="grey")
abline(h=380, lty=3, col="grey")
abline(h=390, lty=3, col="grey")
abline(h=410, lty=3, col="grey")
abline(h=420, lty=3, col="grey")
abline(h=430, lty=3, col="grey")
abline(h=440, lty=3, col="grey")
axis(4, at=c(290, 310, 320, 330, 340, 360, 370, 380, 390, 410, 420, 430, 440),
labels=c(290, 310, 320, 330, 340, 360, 370, 380, 390, 410, 420, 430, 440),
col.axis="grey33", las=0, cex.axis=0.7, tck=0.01, col = "grey33", padj = -2.1)
对不起,'Comment'我回答... – user3216322
@ user3216322对不起,但那个“答案”没有提供很多信息。我无法运行你的代码,因为我没有'Profile07_6'。请确保您的代码可以在* new * R会话中无误地运行。据我所知,你也可以用'grid()'来代替所有'abline'。 –
@ user3216322我编辑了我的帖子。那是你要的吗? –