Closed rblay closed 5 years ago
@Torvaney What I did to solve the issue was to make some slight edits on the annotate_pitch()
function. I simply altered the ggplot::geom_rect()
calls with ggplot:annotate()
cals and added a geom = 'rect'
to the arguments. I'll do a pull request with that if necessary. Best!
Hey, thanks for reporting this.
I suspect that might be because of the coordinate limits in the plot are excluding the pitch rectangle (specifically the x limits), but I could be wrong. Could you post a reprex and the output of SessionInfo()
here to help confirm the cause, please?
Ifgeom = "rect"
is a strong fix to this, I would love to receive a PR!!
I tried to reproduce the error but now it seems to work. I'll post the reprex and make the PR if it reoccurs!
Ah sorry, I think this issue got closed by https://github.com/Torvaney/ggsoccer/commit/b6b2aaba2ab1737502d5237f7f4694a2d0d81189
Hello, big fan of this project! I tried to use it on some data and the annotate_pitch seems not to be working properly. I'm not sure if it is some issue with my R or ggplot2 version. Here is a picture of what is being displayed with
ggplot() + annotate_pitch()
: