更改地层图(即多面板图)的 x 轴限制

Change x-axis limits on stratigraphic plots (ie. multi-panel plots)

如何手动调整地层图中每个面板的 x 轴范围?

例如,这里是 analogueStratiplot

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 from 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)?

我想我需要提供一些东西来解决底层的 lattice/base 情节代码,但我不确定如何开始。

这是一个快速的部分答案,通过调整绘图对象的限制并使用 lattice 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))

这给出了

但这不包括每个段开头的小空白 space