R 交互绘图的手动比例值不足:ggplot2错误
我正在ggplot2中创建交互图,并不断出现错误-错误:手动比例中的值不足。需要4个,但仅提供2个 守则:R 交互绘图的手动比例值不足:ggplot2错误,r,plot,ggplot2,colors,interaction,R,Plot,Ggplot2,Colors,Interaction,我正在ggplot2中创建交互图,并不断出现错误-错误:手动比例中的值不足。需要4个,但仅提供2个 守则: plot1<- data.frame(effect("current*child", outcome, xlevels=list(child=c(-1,1)))) ggplot(plot1) + geom_line(aes(current, fit, color = child, linetype=factor(current)), size= 1.25, )+ scale_c
plot1<- data.frame(effect("current*child", outcome,
xlevels=list(child=c(-1,1))))
ggplot(plot1) + geom_line(aes(current, fit, color = child,
linetype=factor(current)), size= 1.25, )+ scale_colour_gradient(low =
"darkred", high = "darkblue") + theme_bw()+
coord_cartesian(xlim=c(-10,10), ylim=c(-10,10)) +
scale_linetype_manual(values=c("solid", "dotted"))+
theme(legend.position='none', panel.grid.major = element_blank(),
text = element_text(size=16),
panel.grid.minor = element_blank(),)+
xlab("Current")+ylab("Outcome")
plot1请提供一个数据框的dput输出的可复制示例。它更可能与scale\u linetype\u手册(值=c(“实心”、“虚线”)
有关。但是特别是在请求绘图帮助时,您需要包含一个示例输入数据,以便我们可以运行代码来查看发生了什么。