我使用ggplot和创建了一个图,geom_line并希望在图上显示各个数据值(数字)。
到目前为止,这是我的代码:
ggplot(errors_prob_3) +
geom_point(aes(x = ID, y = train_mean, colour = 'red')) +
geom_line(aes(x = ID, y = train_mean, colour = 'red')) +
geom_point(aes(x = ID, y = train_sd, colour = 'blue')) +
geom_line(aes(x = ID, y = train_sd, colour = 'blue')) +
geom_point(aes(x = ID, y = test_mean, colour = 'green')) +
geom_line(aes(x = ID, y = test_mean, colour = 'green')) +
geom_point(aes(x = ID, y = test_sd, colour = 'purple') )+
geom_line(aes(x = …Run Code Online (Sandbox Code Playgroud)