Torvaney / ggsoccer

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

Fix penalty box arc #8

Closed Torvaney closed 5 years ago

Torvaney commented 6 years ago

The current method of plotting a whole circle behind the penalty box means that on small/distorted pitch shapes, the circle can peek out from behind the goal:

rplot01

As part of the same issue, the circles change size (relative to the rest of the pitch) depending on the size/aspect ratio of the pitch. This should be avoided if possible.

Perhaps there's a clean solution using annotate?

Torvaney commented 5 years ago

Alternatively, we could continue to use annotation_custom but change the grob to use grid::grid.path

Torvaney commented 5 years ago

Or could add a viewport (arg to circleGrob) to clip the circle -> semi-circle

Torvaney commented 5 years ago

Or we could use data (generated from the pitch spec) to plot a circle (or an oval due to the coordinates)

Torvaney commented 5 years ago

or could just use ggforce 🤷‍♂

Torvaney commented 5 years ago

another false alarm :/