如何在地层图中手动调整每个面板的x轴限制?
例如,这里Stratiplot
来自analogue
:
library(analogue) data(V12.122) Depths <- as.numeric(rownames(V12.122)) (plt <- Stratiplot(Depths ~ O.univ + G.ruber + G.tenel + G.pacR, data = V12.122, type = c("h","l","g","smooth")))
例如,我怎样才能将G.ruber的xlim改为c(0.3,0.9)和G.pacR改为c(0,0.75)?
或者,另一种可能性,strat.plot
来自rioja
:
library(rioja) library(vegan) ## decorana data(RLGH) # remove less abundant taxa mx <- apply(RLGH$spec, 2, max) spec <- RLGH$spec[, mx > 3] depth <- RLGH$depths$Depth #basic stratigraphic plot strat.plot(spec, y.rev=TRUE)
例如,我怎样才能将TA004A的xlim更改为c(0,20)?
我想我需要提供一些东西来解决底层的格子/基础图代码,但我不知道如何开始使用它.
通过调整绘图对象的限制并使用网格Extra包来调整面板大小,这是一个快速的部分答案
# your data library(analogue) data(V12.122) Depths <- as.numeric(rownames(V12.122)) (plt <- Stratiplot(Depths ~ O.univ + G.ruber + G.tenel + G.pacR, data = V12.122, type = c("h","l","g","smooth"))) # manually change the limits of second panel # this auto updates ticks and labels plt$x.limits[[2]] <- c(0.25,0.95) ; # resize the panels latticeExtra::resizePanels(plt, w=c(5,5,5,5))
这使
但是,这不包括每个段开头的小空格