【发布时间】:2021-08-24 08:04:26
【问题描述】:
我想删除使用 geom_ribbon 创建的图例中的填充。请注意,these answers 不能解决此特定问题。
最小的工作示例
library(ggplot2)
library(ggeffects)
fit <- lm(mpg ~ hp*disp, data= mtcars)
me <- ggeffect(fit,
ci.lvl = .95,
type = "fe",
terms = c("hp", "disp"))
ggplot(data = me,
mapping = aes(x = x, y = predicted, linetype = group)) +
geom_line() +
geom_ribbon(aes(ymin = conf.low,
ymax = conf.high),
alpha = .5)
【问题讨论】: