Package 'sportyR'

Title: Plot Scaled 'ggplot' Representations of Sports Playing Surfaces
Description: Create scaled 'ggplot' representations of playing surfaces. Playing surfaces are drawn pursuant to rule-book specifications. This package should be used as a baseline plot for displaying any type of tracking data.
Authors: Ross Drucker [aut, cre]
Maintainer: Ross Drucker <[email protected]>
License: GPL (>= 3)
Version: 2.2.3
Built: 2025-02-03 08:28:09 UTC
Source: https://github.com/sportsdataverse/sportyr

Help Index


Check to see what features of a surface can be colored

Description

Check to see what features of a surface can be colored

Usage

cani_color_league_features(league_code, sport_name = NULL)

Arguments

league_code

The case-insensitive league code to be plotted

sport_name

The name of a sport to use in the event that the league_code supplied has more than one sport associated with it. Default: NULL

Value

Nothing, but a message is sent to the console

Examples

cani_color_league_features("NCAA", "basketball")

Check to see if a league can be plotted, and alert as to which function(s) that league will work for

Description

Check to see if a league can be plotted, and alert as to which function(s) that league will work for

Usage

cani_plot_league(league_code)

Arguments

league_code

The case-insensitive league code to be plotted

Value

Nothing, but a message is sent to the console

Examples

cani_plot_league("MLB")

Check to see if a sport can be plotted, and alert as to which league(s) are plottable for the sport

Description

Check to see if a sport can be plotted, and alert as to which league(s) are plottable for the sport

Usage

cani_plot_sport(sport_code)

Arguments

sport_code

The case-insensitive sport name

Value

Nothing, but a message is sent to the console

Examples

cani_plot_sport("basketball")

Convert all units, regardless of starting and ending units

Description

Convert all units, regardless of starting and ending units

Usage

convert_units(meas, from_unit, to_unit, conversion_columns = NULL)

Arguments

meas

A measurement in any unit of length

from_unit

A string containing the original unit of measure to be converted

to_unit

A string containing the ending unit of measure

conversion_columns

A vector containing the columns to convert if meas is of type data.frame

Value

The measurement in converted units

Examples

convert_units(1, "in", "cm")
convert_units(100, "cm", "m")

Generate a ggplot2 instance containing a baseball field for a specified league

Description

Generate a ggplot2 instance containing a baseball field for a specified league

Usage

geom_baseball(
  league,
  display_range = "full",
  field_updates = list(),
  color_updates = list(),
  rotation = 0,
  x_trans = 0,
  y_trans = 0,
  field_units = NULL,
  xlims = NULL,
  ylims = NULL
)

Arguments

league

The league for which to draw the surface. This is case-insensitive

display_range

A case-insensitive string indicating the display range to use for the plot. The default is "full", which will be returned when either an invalid or no value is passed to the function.

The possible display ranges are:

"full"

The full field. This is the default

"infield"

The infield on the baseball field

field_updates

A list of updates to the field's parameters. These will overwrite the parameters of the league

color_updates

A list of updates to the field's default colors, which are set by baseball_features_set_colors()

rotation

An angle, given in degrees, through which the plot should be rotated

x_trans

The amount that the x coordinates are to be shifted. By convention, the +x axis extends from the back tip of home plate towards the left-handed batter's box (the first base side of the field)

y_trans

The amount that the y coordinates are to be shifted. By convention, the +y axis extends from the back tip of home plate towards straight-away center field

field_units

The units with which to draw the field. The default is NULL, which will apply the rule-book specified units

xlims

The limits on the final display in the x direction. The default is NULL, which will utilize the xlims specified by the display_range parameter

ylims

The limits on the final display in the y direction. The default is NULL, which will utilize the ylims specified by the display_range parameter

Value

A ggplot2 instance with a full-surface representation of a baseball field

Examples

## Not run: 
  geom_baseball(league = "MLB", rotation = 270, display_range = "infield")
  geom_baseball(league = "little league", field_units = "m")

## End(Not run)

Generate a ggplot2 instance containing a basketball court for a specified league

Description

Generate a ggplot2 instance containing a basketball court for a specified league

Usage

geom_basketball(
  league,
  display_range = "full",
  court_updates = list(),
  color_updates = list(),
  rotation = 0,
  x_trans = 0,
  y_trans = 0,
  court_units = NULL,
  xlims = NULL,
  ylims = NULL
)

Arguments

league

The league for which to draw the surface. This is case-insensitive

display_range

A case-insensitive string indicating the display range to use for the plot. The default is "full", which will be returned when either an invalid or no value is passed to the function.

The possible display ranges are:

"full"

The full court. This is the default

"in_bounds_only"

The full in-bounds area of the court

"in bounds only"

The full in-bounds area of the court

"offense"

The TV-right half of the court half-court. This is considered the offensive half of the court

"offence"

The TV-right half of the court half-court. This is considered the offensive half of the court

"offensivehalfcourt"

The TV-right half of the court half-court. This is considered the offensive half of the court

"offensive_half_court"

The TV-right half of the court half-court. This is considered the offensive half of the court

"offensive half court"

The TV-right half of the court half-court. This is considered the offensive half of the court

"defense"

The TV-left half of the court half-court. This is considered the defensive half of the court

"defence"

The TV-left half of the court half-court. This is considered the defensive half of the court

"defensivehalfcourt"

The TV-left half of the court half-court. This is considered the defensive half of the court

"defensive_half_court"

The TV-left half of the court half-court. This is considered the defensive half of the court

"defensive half court"

The TV-left half of the court half-court. This is considered the defensive half of the court

"offensivekey"

The TV-right offensive key (three-point line and two-point range)

"offensive_key"

The TV-right offensive key (three-point line and two-point range)

"offensive key"

The TV-right offensive key (three-point line and two-point range)

"attackingkey"

The TV-right offensive key (three-point line and two-point range)

"attacking_key"

The TV-right offensive key (three-point line and two-point range)

"attacking key"

The TV-right offensive key (three-point line and two-point range)

"defensivekey"

The TV-left defensive key (three-point line and two-point range)

"defensive_key"

The TV-left defensive key (three-point line and two-point range)

"defensive key"

The TV-left defensive key (three-point line and two-point range)

"defendingkey"

The TV-left defensive key (three-point line and two-point range)

"defending_key"

The TV-left defensive key (three-point line and two-point range)

"defending key"

The TV-left defensive key (three-point line and two-point range)

"offensivepaint"

The TV-right offensive free-throw lane

"offensive_paint"

The TV-right offensive free-throw lane

"offensive paint"

The TV-right offensive free-throw lane

"attackingpaint"

The TV-right offensive free-throw lane

"attacking_paint"

The TV-right offensive free-throw lane

"attacking paint"

The TV-right offensive free-throw lane

"offensivelane"

The TV-right offensive free-throw lane

"offensive_lane"

The TV-right offensive free-throw lane

"offensive lane"

The TV-right offensive free-throw lane

"attackinglane"

The TV-right offensive free-throw lane

"attacking_lane"

The TV-right offensive free-throw lane

"attacking lane"

The TV-right offensive free-throw lane

"defensivepaint"

The TV-left defensive free-throw lane

"defensive_paint"

The TV-left defensive free-throw lane

"defensive paint"

The TV-left defensive free-throw lane

"defendingpaint"

The TV-left defensive free-throw lane

"defending_paint"

The TV-left defensive free-throw lane

"defending paint"

The TV-left defensive free-throw lane

"defensivelane"

The TV-left defensive free-throw lane

"defensive_lane"

The TV-left defensive free-throw lane

"defensive lane"

The TV-left defensive free-throw lane

"defendinglane"

The TV-left defensive free-throw lane

"defending_lane"

The TV-left defensive free-throw lane

"defending lane"

The TV-left defensive free-throw lane

court_updates

A list of updates to the courts' parameters. These will overwrite the parameters of the league

color_updates

A list of updates to the courts' default colors, which are set by basketball_features_set_colors()

rotation

An angle, given in degrees, through which the plot should be rotated

x_trans

The amount that the x coordinates are to be shifted. By convention, the +x axis extends from the center of the court towards the right-hand basket when viewing the court in TV View

y_trans

The amount that the y coordinates are to be shifted. By convention, the +y axis extends from the center of the court towards the top of the court when viewing the court in TV view

court_units

The units with which to draw the court. The default is NULL, which will apply the rule-book specified units

xlims

The limits on the final display in the x direction. The default is NULL, which will utilize the xlims specified by the display_range parameter

ylims

The limits on the final display in the y direction. The default is NULL, which will utilize the ylims specified by the display_range parameter

Value

A ggplot2 instance with a full-surface representation of a basketball court

Examples

## Not run: 
  geom_basketball(league = "NBA", rotation = 270, display_range = "offense")
  geom_basketball(league = "fiba", court_units = "ft")

## End(Not run)

Generate a ggplot2 instance containing a curling sheet for a specified league

Description

Generate a ggplot2 instance containing a curling sheet for a specified league

Usage

geom_curling(
  league,
  display_range = "full",
  sheet_updates = list(),
  color_updates = list(),
  rotation = 0,
  x_trans = 0,
  y_trans = 0,
  sheet_units = NULL,
  xlims = NULL,
  ylims = NULL
)

Arguments

league

The league for which to draw the surface. This is case-insensitive

display_range

A case-insensitive string indicating the display range to use for the plot. The default is "full", which will be returned when either an invalid or no value is passed to the function.

The possible display ranges are:

"full"

The full sheet. This is the default

"in_bounds_only"

The full in-bounds area of the sheet

"in bounds only"

The full in-bounds area of the sheet

"house"

A single house, which defaults to the top house in TV view

sheet_updates

A list of updates to the sheet's parameters. These will overwrite the parameters of the league

color_updates

A list of updates to the sheet's default colors, which are set by curling_features_set_colors()

rotation

An angle, given in degrees, through which the plot should be rotated

x_trans

The amount that the x coordinates are to be shifted. By convention, the +x axis extends from the center of the sheet towards the right-hand goal when viewing the sheet in TV View

y_trans

The amount that the y coordinates are to be shifted. By convention, the +y axis extends from the center of the sheet towards the top of the sheet when viewing the sheet in TV view

sheet_units

The units with which to draw the sheet. The default is NULL, which will apply the rule-book specified units

xlims

The limits on the final display in the x direction. The default is NULL, which will utilize the xlims specified by the display_range parameter

ylims

The limits on the final display in the y direction. The default is NULL, which will utilize the ylims specified by the display_range parameter

Value

A ggplot2 instance with a full-surface representation of a curling sheet

Examples

## Not run: 
  geom_curling(league = "wcf", rotation = 270, display_range = "house")
  geom_curling(league = "wcf", sheet_units = "ft")

## End(Not run)

Generate a ggplot2 instance containing a football field for a specified league

Description

Generate a ggplot2 instance containing a football field for a specified league

Usage

geom_football(
  league,
  display_range = "full",
  field_updates = list(),
  color_updates = list(),
  rotation = 0,
  x_trans = 0,
  y_trans = 0,
  field_units = NULL,
  xlims = NULL,
  ylims = NULL
)

Arguments

league

The league for which to draw the surface. This is case-insensitive

display_range

A case-insensitive string indicating the display range to use for the plot. The default is "full", which will be returned when either an invalid or no value is passed to the function.

The possible display ranges are:

"full"

The full field. This is the default

"in_bounds_only"

The full in-bounds area of the field

"in bounds only"

The full in-bounds area of the field

"offense"

The TV-right half of the field

"offence"

The TV-right half of the field

"offensivehalffield"

The TV-right half of the field

"offensive_half_field"

The TV-right half of the field

"offensive half field"

The TV-right half of the field

"defense"

The TV-left half of the field

"defence"

The TV-left half of the field

"defensivehalffield"

The TV-left half of the field

"defensive_half_field"

The TV-left half of the field

"defensive half field"

The TV-left half of the field

"redzone"

The offensive red zone of the field. This is by definition 20 yards from the goal line

"red_zone"

The offensive red zone of the field. This is by definition 20 yards from the goal line

"red zone"

The offensive red zone of the field. This is by definition 20 yards from the goal line

"oredzone"

The offensive red zone of the field. This is by definition 20 yards from the goal line

"offensive_red_zone"

The offensive red zone of the field. This is by definition 20 yards from the goal line

"offensive red zone"

The offensive red zone of the field. This is by definition 20 yards from the goal line

"dredzone"

The defensive red zone of the field. This is by definition 20 yards from the goal line

"defensive_red_zone"

The defensive red zone of the field. This is by definition 20 yards from the goal line

"defensive red zone"

The defensive red zone of the field. This is by definition 20 yards from the goal line

field_updates

A list of updates to the field's parameters. These will overwrite the parameters of the league

color_updates

A list of updates to the field's default colors, which are set by football_features_set_colors()

rotation

An angle, given in degrees, through which the plot should be rotated

x_trans

The amount that the x coordinates are to be shifted. By convention, the +x axis extends from the center of the field towards the right-hand endzone when viewing the field in TV View

y_trans

The amount that the y coordinates are to be shifted. By convention, the +y axis extends from the center of the field towards the sideline when viewing the field in TV view

field_units

The units with which to draw the field. The default is NULL, which will apply the rule-book specified units

xlims

The limits on the final display in the x direction. The default is NULL, which will utilize the xlims specified by the display_range parameter

ylims

The limits on the final display in the y direction. The default is NULL, which will utilize the ylims specified by the display_range parameter

Value

A ggplot2 instance with a full-surface representation of a football field

Examples

## Not run: 
  geom_football(league = "NFL", rotation = 270, display_range = "red_zone")
  geom_football(league = "cfl", field_units = "ft")

## End(Not run)

Generate a ggplot2 instance containing an ice rink for a specified league

Description

Generate a ggplot2 instance containing an ice rink for a specified league

Usage

geom_hockey(
  league,
  display_range = "full",
  rink_updates = list(),
  color_updates = list(),
  rotation = 0,
  x_trans = 0,
  y_trans = 0,
  rink_units = NULL,
  xlims = NULL,
  ylims = NULL
)

Arguments

league

The league for which to draw the surface. This is case-insensitive

display_range

A case-insensitive string indicating the display range to use for the plot. The default is "full", which will be returned when either an invalid or no value is passed to the function.

The possible display ranges are:

"full"

The full ice surface. This is the default

"in_bounds_only"

The full in-bounds area of the rink

"in bounds only"

The full in-bounds area of the rink

"offense"

The TV-right half of the rink

"offence"

The TV-right half of the rink

"defense"

The TV-left half of the rink

"defence"

The TV-left half of the rink

"ozone"

The TV-right zone of the rink

"offensive_zone"

The TV-right zone of the rink

"offensive zone"

The TV-right zone of the rink

"attacking_zone"

The TV-right zone of the rink

"attacking zone"

The TV-right zone of the rink

"dzone"

The TV-left zone of the rink

"defensive_zone"

The TV-left zone of the rink

"defensive zone"

The TV-left zone of the rink

"defending_zone"

The TV-left zone of the rink

"defending zone"

The TV-left zone of the rink

"nzone"

The middle zone of the rink

"neutral"

The middle zone of the rink

"neutral_zone"

The middle zone of the rink

"neutral zone"

The middle zone of the rink

rink_updates

A list of updates to the rink's parameters. These will overwrite the parameters of the league

color_updates

A list of updates to the courts' default colors, which are set by hockey_features_set_colors()

rotation

An angle, given in degrees, through which the plot should be rotated

x_trans

The amount that the x coordinates are to be shifted. By convention, the +x axis extends from the center of the ice surface towards the right-hand goal when viewing the rink in TV View

y_trans

The amount that the y coordinates are to be shifted. By convention, the +y axis extends from the center of the ice surface towards the top of the rink when viewing the rink in TV view

rink_units

The units with which to draw the rink. The default is NULL, which will apply the rule-book specified units

xlims

The limits on the final display in the x direction. The default is NULL, which will utilize the xlims specified by the display_range parameter

ylims

The limits on the final display in the y direction. The default is NULL, which will utilize the ylims specified by the display_range parameter

Value

A ggplot2 instance with a full-surface representation of an ice hockey rink

Examples

## Not run: 
  geom_hockey(league = "NHL", rotation = 270, display_range = "ozone")
  geom_hockey(league = "iihf", rink_units = "ft")

## End(Not run)

Generate a ggplot2 instance containing a lacrosse field for a specified league

Description

Generate a ggplot2 instance containing a lacrosse field for a specified league

Usage

geom_lacrosse(
  league,
  display_range = "full",
  field_updates = list(),
  color_updates = list(),
  rotation = 0,
  x_trans = 0,
  y_trans = 0,
  field_units = NULL,
  xlims = NULL,
  ylims = NULL
)

Arguments

league

The league for which to draw the surface. This is case-insensitive

display_range

A case-insensitive string indicating the display range to use for the plot. The default is "full", which will be returned when either an invalid or no value is passed to the function.

The possible display ranges are:

"full"

The full field. This is the default

"offense"

The offensive half of the field. This is the right half of the field in TV view

"offence"

The offensive half of the field. This is the right half of the field in TV view

"offensivehalffield"

The offensive half of the field. This is the right half of the field in TV view

"offensive_half_field"

The offensive half of the field. This is the right half of the field in TV view

"offensive half field"

The offensive half of the field. This is the right half of the field in TV view

"defense"

The defensive half of the field. This is the left half of the field in TV view

"defence"

The defensive half of the field. This is the left half of the field in TV view

"defensivehalffield"

The defensive half of the field. This is the left half of the field in TV view

"defensive_half_field"

The defensive half of the field. This is the left half of the field in TV view

"defensive half field"

The defensive half of the field. This is the left half of the field in TV view

field_updates

A list of updates to the fields' parameters. These will overwrite the parameters of the league

color_updates

A list of updates to the fields' default colors, which are set by lacrosse_features_set_colors()

rotation

An angle, given in degrees, through which the plot should be rotated

x_trans

The amount that the x coordinates are to be shifted. By convention, the +x axis extends from the center of the field towards the right-hand basket when viewing the field in TV View

y_trans

The amount that the y coordinates are to be shifted. By convention, the +y axis extends from the center of the field towards the top of the field when viewing the field in TV view

field_units

The units with which to draw the field. The default is NULL, which will apply the rule-book specified units

xlims

The limits on the final display in the x direction. The default is NULL, which will utilize the xlims specified by the display_range parameter

ylims

The limits on the final display in the y direction. The default is NULL, which will utilize the ylims specified by the display_range parameter

Value

A ggplot2 instance with a full-surface representation of a lacrosse field

Examples

## Not run: 
  geom_lacrosse(league = "NCAA", rotation = 270, display_range = "offense")
  geom_lacrosse(league = "FIVB", field_units = "ft")

## End(Not run)

Generate a ggplot2 instance containing a soccer pitch for a specified league

Description

Generate a ggplot2 instance containing a soccer pitch for a specified league

Usage

geom_soccer(
  league,
  display_range = "full",
  pitch_updates = list(),
  color_updates = list(),
  rotation = 0,
  x_trans = 0,
  y_trans = 0,
  pitch_units = NULL,
  xlims = NULL,
  ylims = NULL
)

Arguments

league

The league for which to draw the surface. This is case-insensitive

display_range

A case-insensitive string indicating the display range to use for the plot. The default is "full", which will be returned when either an invalid or no value is passed to the function.

The possible display ranges are:

"full"

The full pitch. This is the default

"in_bounds_only"

The full in-bounds area of the pitch

"in bounds only"

The full in-bounds area of the pitch

"offense"

The TV-right half of the pitch

"offence"

The TV-right half of the pitch

"offensivehalfpitch"

The TV-right half of the pitch

"offensive_half_pitch"

The TV-right half of the pitch

"offensive half pitch"

The TV-right half of the pitch

"defense"

The TV-left half of the pitch

"defence"

The TV-left half of the pitch

"defensivehalfpitch"

The TV-left half of the pitch

"defensive_half_pitch"

The TV-left half of the pitch

"defensive half pitch"

The TV-left half of the pitch

pitch_updates

A list of updates to the pitch's parameters. These will overwrite the parameters of the league

color_updates

A list of updates to the pitch's default colors, which are set by soccer_features_set_colors()

rotation

An angle, given in degrees, through which the plot should be rotated

x_trans

The amount that the x coordinates are to be shifted. By convention, the +x axis extends from the center of the pitch towards the right-hand goal when viewing the pitch in TV View

y_trans

The amount that the y coordinates are to be shifted. By convention, the +y axis extends from the center of the pitch towards the top of the pitch when viewing the pitch in TV view

pitch_units

The units with which to draw the pitch. The default is NULL, which will apply the rule-book specified units

xlims

The limits on the final display in the x direction. The default is NULL, which will utilize the xlims specified by the display_range parameter

ylims

The limits on the final display in the y direction. The default is NULL, which will utilize the ylims specified by the display_range parameter

Value

A ggplot2 instance with a full-surface representation of a soccer pitch

Examples

## Not run: 
  geom_soccer(league = "EPL", rotation = 270, display_range = "offense")
  geom_soccer(league = "fifa", pitch_units = "ft")

## End(Not run)

Generate a ggplot2 instance containing a tennis court for a specified league

Description

Generate a ggplot2 instance containing a tennis court for a specified league

Usage

geom_tennis(
  league,
  display_range = "full",
  court_updates = list(),
  color_updates = list(),
  rotation = 0,
  x_trans = 0,
  y_trans = 0,
  court_units = NULL,
  xlims = NULL,
  ylims = NULL
)

Arguments

league

The league for which to draw the surface. This is case-insensitive

display_range

A case-insensitive string indicating the display range to use for the plot. The default is "full", which will be returned when either an invalid or no value is passed to the function.

The possible display ranges are:

"full"

The full court. This is the default

"in_bounds_only"

The full in-bounds area of the court

"in bounds only"

The full in-bounds area of the court

"serve"

The serving half of the court

"serving"

The serving half of the court

"servicehalf"

The serving half of the court

"service_half"

The serving half of the court

"service half"

The serving half of the court

"servinghalf"

The serving half of the court

"serving_half"

The serving half of the court

"serving half"

The serving half of the court

"receive"

The receiving half of the court

"receiving"

The receiving half of the court

"receivicehalf"

The receiving half of the court

"receivice_half"

The receiving half of the court

"receivice half"

The receiving half of the court

"receivinghalf"

The receiving half of the court

"receiving_half"

The receiving half of the court

"receiving half"

The receiving half of the court

court_updates

A list of updates to the courts' parameters. These will overwrite the parameters of the league

color_updates

A list of updates to the courts' default colors, which are set by tennis_features_set_colors()

rotation

An angle, given in degrees, through which the plot should be rotated

x_trans

The amount that the x coordinates are to be shifted. By convention, the +x axis extends from the center of the court towards the right-hand serviceline when viewing the court in TV View

y_trans

The amount that the y coordinates are to be shifted. By convention, the +y axis extends from the center of the court towards the sideline when viewing the court in TV view

court_units

The units with which to draw the court. The default is NULL, which will apply the rule-book specified units

xlims

The limits on the final display in the x direction. The default is NULL, which will utilize the xlims specified by the display_range parameter

ylims

The limits on the final display in the y direction. The default is NULL, which will utilize the ylims specified by the display_range parameter

Value

A ggplot2 instance with a full-surface representation of a tennis court

Examples

## Not run: 
  geom_tennis(league = "USTA", rotation = 270, display_range = "serving")
  geom_tennis(league = "itf", court_units = "m")

## End(Not run)

Generate a ggplot2 instance containing a volleyball court for a specified league

Description

Generate a ggplot2 instance containing a volleyball court for a specified league

Usage

geom_volleyball(
  league,
  display_range = "full",
  court_updates = list(),
  color_updates = list(),
  rotation = 0,
  x_trans = 0,
  y_trans = 0,
  court_units = NULL,
  xlims = NULL,
  ylims = NULL
)

Arguments

league

The league for which to draw the surface. This is case-insensitive

display_range

A case-insensitive string indicating the display range to use for the plot. The default is "full", which will be returned when either an invalid or no value is passed to the function.

The possible display ranges are:

"full"

The full court. This is the default

"in_bounds_only"

The full in-bounds area of the court

"in bounds only"

The full in-bounds area of the court

"offense"

The offensive half of the court. This is the right half of the court in TV view

"offence"

The offensive half of the court. This is the right half of the court in TV view

"offensivehalfcourt"

The offensive half of the court. This is the right half of the court in TV view

"offensive_half_court"

The offensive half of the court. This is the right half of the court in TV view

"offensive half court"

The offensive half of the court. This is the right half of the court in TV view

"defense"

The defensive half of the court. This is the left half of the court in TV view

"defence"

The defensive half of the court. This is the left half of the court in TV view

"defensivehalfcourt"

The defensive half of the court. This is the left half of the court in TV view

"defensive_half_court"

The defensive half of the court. This is the left half of the court in TV view

"defensive half court"

The defensive half of the court. This is the left half of the court in TV view

court_updates

A list of updates to the courts' parameters. These will overwrite the parameters of the league

color_updates

A list of updates to the courts' default colors, which are set by volleyball_features_set_colors()

rotation

An angle, given in degrees, through which the plot should be rotated

x_trans

The amount that the x coordinates are to be shifted. By convention, the +x axis extends from the center of the court towards the right-hand basket when viewing the court in TV View

y_trans

The amount that the y coordinates are to be shifted. By convention, the +y axis extends from the center of the court towards the top of the court when viewing the court in TV view

court_units

The units with which to draw the court. The default is NULL, which will apply the rule-book specified units

xlims

The limits on the final display in the x direction. The default is NULL, which will utilize the xlims specified by the display_range parameter

ylims

The limits on the final display in the y direction. The default is NULL, which will utilize the ylims specified by the display_range parameter

Value

A ggplot2 instance with a full-surface representation of a volleyball court

Examples

## Not run: 
  geom_volleyball(league = "NCAA", rotation = 270, display_range = "offense")
  geom_volleyball(league = "FIVB", court_units = "ft")

## End(Not run)