我有两个不同的数据框,我想在ggplot2中重叠:
plot3<- ggplot(fit3f, aes(x=exp(exp(.fitted)), y=.resid)) +
ggtitle("data points: 3") +
xlab("Amplification") + ylab("res. pear.") +
geom_point(colour="dodgerblue4") +
# ylim(c(0,1)) +
geom_vline(xintercept=150, linetype="dashed", colour="orange", size=2) +
geom_point(data=fit3f_not_irr, aes(exp(exp(.fitted)), y=.resid, alpha = 0.05, colour="firebrick4"), show.legend = FALSE)
但是,它不透明。那是为什么?
答案 0 :(得分:2)
alpha = 0.05
进入了aes(...)
- 函数调用。试试这个:
geom_point(data=fit3f_not_irr, aes(exp(exp(.fitted)),
y=.resid,
colour="firebrick4"),
alpha = 0.05,
show.legend = FALSE)