-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracab pitch not showing correctly #36
Comments
Hi! Thanks for reporting this - I will look into this issue over the weekend. In the meantime, you should be able to workaround this by rescaling your coordinates to another provider's spec using the to_statsbomb <- rescale_coordinates(from = pitch_tracab, to = pitch_statsbomb)
ggplot(your_data) +
annotate_pitch(dimensions = pitch_statsbomb) +
geom_point(aes(x = to_statsbomb$x(x), y = to_statsbomb$(y))) +
theme_pitch() |
Hey, @mistpelt7, could I ask what version of ggsoccer you are using? If you're not sure, it should be in the output of Also, would you be able to make a reprex with your issue? When I run the following code, I don't see the same issue: library(ggsoccer)
library(ggplot2)
ggplot() +
annotate_pitch(dimensions = pitch_tracab) +
theme_pitch() Created on 2024-05-29 with reprex v2.0.2 |
Hi @Torvaney Here is the r code for the plot. I included all the packages I am using for my plot incase one of them is interfering with it. library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
library(jsonlite)
library(tidyr)
library(nplyr)
library(tidyverse)
library(ggplot2)
library(viridis)
#> Loading required package: viridisLite
library(ggsoccer)
ggplot()+
annotate_pitch(dimensions = pitch_tracab) Created on 2024-05-29 with reprex v2.1.0 |
Got it - thanks. I can reproduce it on 0.1.7. CRAN is lagging a bit behind the Github version. If you |
Hi,
I am using tracab data to built heat maps in r. When loading the pitch with tracab dimensions the half circle in front of the left goal is not in the right place and appears in the middle of the pitch. I was wondering if there is a way to remove that part or a way to fix it so it's in the right position.
The text was updated successfully, but these errors were encountered: