draw_pitch_orig: Create a pitch plot ready for Statsbomb data

View source: R/draw_pitch_org.R

draw_pitch_origR Documentation

Create a pitch plot ready for Statsbomb data

Description

Creating a pitch plot using ggplot2 that is ready to plot actions on top. Numerous options allow customisation.

Usage

draw_pitch_orig(
  pitch_length = 105,
  pitch_width = 68,
  pitch_units = "meters",
  pitch_layout = "horizontal",
  pitch_section = "full",
  grass_colour = "#ffffff",
  line_colour = "#A9A9A9",
  background_colour = "#ffffff",
  goal_colour = "#000000",
  goaltype = "line",
  middlethird = FALSE,
  BasicFeatures = FALSE,
  overlay = FALSE,
  arcs = TRUE,
  padding = 5
)

Arguments

pitch_length

Length of the pitch. Always the long side. Default 105

pitch_width

Width of the pitch. Default 68

pitch_units

Units of measure in "meters" or "yards". Default "meters"

pitch_layout

Plot the pitch vertical or horizontal. Default "horizontal"

pitch_section

Full or subsection of field. "full", "att_half". Default "full"

grass_colour

A string as a colour by word or #HEX code

line_colour

A string as a colour by word or #HEX code

background_colour

A string as a colour by word or #HEX code

goal_colour

A string as a colour by word or #HEX code

goaltype

String, either "line", "box" or "barcanumbers". Default "line"

middlethird

Boolean. Default FALSE

BasicFeatures

Boolean. Default FALSE

overlay

Draw lines on top of the field. "JdeP" "grid_30" or FALSE

arcs

Boolean. Default TRUE

padding

Numeric. Default = 5

Value

A plot of a pitch


stxlen/soccr documentation built on Feb. 17, 2025, 1:23 a.m.