我有这个情节,这是用于生成它的代码:
df <- data.frame(MO, -log(GC1), -log(GC2))
colnames(df) <- c("MO", "IPs -> DLPFc", "DLPFc -> IPs")
ggplot(df, aes(x = MO, y = -log(GC1)), geom = c("point", "smooth")) +
geom_line(aes(y = -log(GC1), linetype = "IPs -> DLPFc")) +
labs(x = "Model Order", y = "-Log(P-Value)", title = "Granger Causality") +
geom_hline(yintercept = 1.3, col='green') +
geom_point() +
geom_smooth() +
geom_line(aes(y = -log(GC2), linetype = "DLPFc -> IPs"), col = 'red')
如何获取正确的图例,指定具有正确方向的线条?谢谢!