Torvaney / ggsoccer

Plot soccer event data in R/ggplot2
https://torvaney.github.io/ggsoccer/
Other
180 stars 27 forks source link

Plot problem #28

Open ghost opened 1 year ago

ghost commented 1 year ago

I have a dataframe containing x and y coordinates of the shot locations of Erling Haaland in today's game vs. Leeds. However, when I run my code, everything plots except the x and y coordinates. I'm fairly new to programming as this is my first project by myself. Not sure if I need to adjust the coordinates or if I am leaving out lines of code. Any help is appreciated! ![Screenshot 2022-12-28 at 7 16 58 PM](https://user-images.git Screenshot 2022-12-28 at 7 17 05 PM hubusercontent.com/120134876/209888582-3aab90c8-4872-4d73-8694-941c530 Screenshot 2022-12-28 at 7 17 22 PM 04986.png)

ghost commented 1 year ago

Screenshot 2022-12-28 at 7 16 58 PM

Torvaney commented 1 year ago

Hey - what data source are you using? By default, annotate_pitch uses StatsPerform coordinates which are 100x100, but it looks like yours are scaled 0-1 in both directions