I'm fairly new to R and am wondering how can I manually change certain geom_point's color?
For instance, here's the average velocity of Justin Verlander from 2008 - 2022
JVvelo_year%>%
ggplot(aes(factor(year), velo, group = 1))+
geom_line()+
geom_point(size = 5, color = "salmon")+
xlab('Season')+
ylab('Average Velocity')
I'd like to change the dots before 2017 to darkblue to align with the Tigers' uniform and keep the dots after 2017 orange.
Thank you
Indicate which row by adding a column:
This has the advantage of being more
ggplot2
-canonical, and will fluidly support legends and other aesthetic-controlling devices.Plot two sets of points, setting
data=
each time.