I am running the code and it works
ggplot(data_df, aes(x= RR, y= PPW, col = year)) +
geom_point(size = 3, alpha=0.6)
Now I am trying to put the mean value of (x,y) on graph en give it another color by adding
ggplot(data_df, aes(x= RR, y= PPW, col = year))) +
geom_point(size = 3, alpha=0.6) +
geom_point(data=data_df, aes(x=mean(RR), y=mean(PPW)) +
geom_point(color="red")
It works, but the color of all points is now red
If I put color inside aes like these, the mean point get another color, and I see it also in legend
ggplot(data_df, aes(x= RR, y= PPW, col = year))) +
geom_point(size = 3, alpha=0.6) +
geom_point(data=data_df, aes(x=mean(RR), y=mean(PPW), color="red"))
I would like to give the color manually. Is it possible?
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)