【发布时间】:2020-08-21 22:36:34
【问题描述】:
我想知道是否可以着色下图中相同曲线下的区域?
library(lattice)
library(latticeExtra)
foo <- xyplot((1:32*.01)~wt|gear , data = mtcars)
foo +
layer(panel.densityplot(rnorm(1e3, 3.5), plot.points = FALSE))
# By color I mean like so:
d <- density(rnorm(1e3, 3.5));
plot(d, type = 'n');
polygon(d, col = 2)
【问题讨论】: