`pitch_opta.Rd`

The coordinate system used to generate pitch markings in
can be customised by supplying a pitch specification to the `dimensions`

argument of `annotate_pitch`

.

ggsoccer provides pitch specifications for a few popular data providers by default. However, user-defined specifications can also be used.

pitch_opta pitch_statsbomb pitch_wyscout

An object of class `list`

of length 10.

A "pitch specification" is simply a list of dimensions that define a coordinate system. The required dimensions are:

"length"The length of the pitch from one goal to the other (x axis)

"width"The width of the pitch from touchline to the other (y axis)

"penalty_box_length"The distance from the goalline to the edge of the penalty area

"penalty_box_width"The width of the penalty area

"six_yard_box_length"The distance from the goalline to the edge of the six-yard box

"six_yard_box_width"The width of the six-yard box

"penalty_spot_distance"The distance from the goalline to the penalty spot

"goal_width"The distance from one goal post to the other

"origin_x"The minimum x coordinate of the pitch

"origin_y"The minimum y coordinate of the pitch

library(ggplot2) library(ggsoccer) ggplot() + annotate_pitch(dimensions = pitch_statsbomb) + theme_pitch()