Draws a soccer pitch as a ggplot object for the purpose of adding layers such as player positions, player trajectories, etc..
The functions listed below are deprecated and will be defunct in
the near future. When possible, alternative functions with similar
functionality are also mentioned. Help pages for deprecated functions are
available at help("soccermatics-deprecated")
.
soccerPitchBG(
lengthPitch = 105,
widthPitch = 68,
arrow = c("none", "r", "l"),
title = NULL,
subtitle = NULL,
theme = c("light", "dark", "grey", "grass"),
data = NULL
)
length and width of pitch in metres
adds team direction of play arrow as right ('r'
) or left ('l'
); 'none'
by default
adds title and subtitle to plot; NULL by default
palette of pitch background and lines, either light
(default), dark
, grey
, or grass
a default dataset for plotting in subsequent layers; NULL by default
pitch fill and line colour
a ggplot object