我正在尝试制作一个图例,其图例标题为“ Condition”,随后的条件名称重命名为“ Deviant”和“ Standard”。其他堆栈溢出答案不适用于我。我尝试了scale_fill_manual,现在尝试了scale_shape_discrete。
ggplot(data = vintscondensed, aes(x = factor(vint, levels =
c("zero","one", "two", "three", "four", "five", "six", "seven",
"eight", "nine")), y = value, group = BinLab)) +
geom_line(aes(color = BinLab)) +
geom_point() +
labs(x = "Vicintiles", y = "ms", linetype = "Trial Type") +
theme(text = element_text(size = 20)) +
theme_bw() +
scale_shape_discrete(name = "Condition", breaks = c("Deviant_RT", "Standard_RT"), labels = c("Deviant", "Standard"))
答案 0 :(得分:0)
分组的美学是颜色,而不是形状。
如果将scale_shape_discrete
更改为scale_colour_discrete
,则应该可以。