Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > ggplot(data=edited_atbat_table[edited_atbat_table$park_id == 2756 & edited_atbat_table$battedball_cd == 'G' & edited_atbat_table$year == 2017,], aes(x=250 - hit_x,y= 250 - hit_y))+
- + geom_point(aes(color=battedball_cd))+
- + xlim(0,250)+
- + ylim(0,250)+
- + geom_hline(yintercept=tail(250 - sort(edited_atbat_table$hit_y[edited_atbat_table$park_id == 2756 & edited_atbat_table$battedball_cd == 'G' & edited_atbat_table$year == 2017]),10)[1] - 5)+
- + geom_vline(xintercept=250 - median(edited_atbat_table$hit_x[edited_atbat_table$park_id == 2756 & edited_atbat_table$year == 2017],na.rm=TRUE))+
- + labs(title='Coca-Cola Field Batted Balls, 2017',subtitle='Source: MiLB Pitch Data')
- Warning message:
- Removed 1476 rows containing missing values (geom_point).
Add Comment
Please, Sign In to add comment