【发布时间】:2026-01-31 14:15:02
【问题描述】:
我正在尝试重新创建一个情节,其中有几行,它们在图例中,但在这个情节旁边也有一些要点。我怎么能在这个图中的点上放置标签。请注意,这些点不在数据框中。我的代码现在看起来像这样:
ggplot(df, aes(x=tau_3)) +
geom_line(aes(y= a1, color = "blue")) +
geom_line(aes(y= a2, color = "green"))+
xlim(0,0.6) +
ylim(0,0.4) +
geom_point(aes(0,0), size =5 , shape = "square") +
geom_point(aes(0,1/6), size =5 , shape = "circle") +
geom_point(aes(0,0.1226), size =5 , shape = "triangle") +
scale_color_discrete(name = "Legend", labels = c("GLO", "GEV"))
【问题讨论】:
-
你有一些数据要处理吗?