soccerPitchFG: Helper function to draw soccer pitch outlines over an...

Description Usage Arguments Value See Also

View source: R/soccerPitchFG.R

Description

Adds soccer pitch outlines (with transparent fill) to an existing ggplot object (e.g. heatmaps, passing maps, etc..)

Usage

1
2
3
4
5
6
7
8
9
soccerPitchFG(
  plot,
  lengthPitch = 105,
  widthPitch = 68,
  colPitch = "black",
  arrow = c("none", "r", "l"),
  title = NULL,
  subtitle = NULL
)

Arguments

plot

an existing ggplot object to add pitch lines layer to

lengthPitch, widthPitch

length and width of pitch in metres

colPitch

colour of pitch markings

arrow

adds team direction of play arrow as right ('r') or left ('l'); 'none' by default

title, subtitle

adds title and subtitle to plot; NULL by default

Value

a ggplot object

See Also

soccerPitch for plotting a soccer pitch as background layer


JoGall/soccermatics documentation built on Aug. 12, 2021, 1:20 p.m.