R 在地层图外添加注释
如何向地层图添加注释 例如,下面是模拟的分层图:R 在地层图外添加注释,r,plot,lattice,R,Plot,Lattice,如何向地层图添加注释 例如,下面是模拟的分层图: library(analogue) data(V12.122) Depths <- as.numeric(rownames(V12.122)) names(V12.122) (plt <- Stratiplot(Depths ~ O.univ + G.ruber + G.tenel + G.pacR, data = V12.122, type = c("
library(analogue)
data(V12.122)
Depths <- as.numeric(rownames(V12.122))
names(V12.122)
(plt <- Stratiplot(Depths ~ O.univ + G.ruber + G.tenel + G.pacR,
data = V12.122,
type = c("h","l","g"),
zones = 400))
plt
库(模拟)
数据(V12.122)
深度这里有一种方法:
pacman::p_load(analogue)
data(V12.122)
Depths <- as.numeric(rownames(V12.122))
names(V12.122)
(plt <- Stratiplot(Depths ~ O.univ + G.ruber + G.tenel + G.pacR,
data = V12.122,
type = c("h","l","g"),
zones = 400))
(plt2 <- Stratiplot(Depths ~ O.univ + G.ruber + G.tenel + G.pacR,
data = V12.122,
type = c("h","l","g"),
yticks = c(150,600,1000)
))
我检查了这个函数的源代码,发现它是xyplot
的包装,然后我进行了搜索,发现doubleYScale
可以通过这种方式将第二个Y轴添加到xyscale
或者保持颜色一致为黑色
doubleYScale(plt,plt2,add.axis=T,use.style = F)
非常整洁,谢谢!我要添加<代码>更新(tRel.Sist.Objutter),PAR.Stase= SimeLead(COL= C(“黑色”,“黑色”))< /C> >使颜色更加均匀…
require(latticeExtra)
doubleYScale(plt,plt2,add.axis=T)
doubleYScale(plt,plt2,add.axis=T,use.style = F)