鉴于现有的剧情对象是有可能添加层UNDERNEATH现有图层?
例如,在下面的图表中,是有可能添加geom_boxplot()到P使得出现箱线图下方 geom_point()?
## Starting from:
library(ggplot2)
P <- ggplot(data=dat, aes(x=id, y=val)) + geom_point()
## This adds boxplot, but obscures some of the points
P + geom_boxplot()
Run Code Online (Sandbox Code Playgroud)
# Which is essentially
ggplot(data=dat, aes(x=id, y=val)) + geom_boxplot() + geom_point()
## However, this involves re-coding all of P (after the point insertion of the new layer).
## which is what I am hoping to avoid.
Run Code Online (Sandbox Code Playgroud)

额外问题: 如果现有图中有多个图层,是否可以指示插入新图层的具体位置(相对于现有图层)?
set.seed(1)
N <- 100
id …Run Code Online (Sandbox Code Playgroud)