geom_hockey: Generate a ggplot2 instance containing an ice rink for a...

Description Usage Arguments Value Examples

View source: R/sport-hockey.R

Description

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

Usage

1
2
3
4
5
6
7
geom_hockey(
  league,
  full_surf = TRUE,
  rotate = FALSE,
  rotation_dir = "ccw",
  ...
)

Arguments

league

The league for which to draw the surface

full_surf

A boolean indicating whether or not to plot a full surface represenation of the surface. Default: TRUE

rotate

A boolean indicating whether or not the final rink plot needs to be rotated. Default: FALSE

rotation_dir

A string indicating which direction to rotate the final rink plot Default: 'ccw'

...

Additional arguments to pass to the function. These should be the colors to pass to the {league}_features_set_colors() function, (although the colors are defined in the rule book) or units with which to draw the plot

Value

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

Examples

1
2
3
geom_hockey(league = "NHL")
geom_hockey(league = "IIHF", full_surf = FALSE)
geom_hockey(league = "NCAA", rotate = TRUE, rotation_dir = "ccw")

sportyR documentation built on April 20, 2021, 5:06 p.m.

Related to geom_hockey in sportyR...