plot_play: Plot a play

Description Usage Arguments

View source: R/plotting_functions.R

Description

Plot or animate a play.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
plot_play(
  df_track,
  orientation = TRUE,
  dot_size = 6,
  segment_length = 2.5,
  segment_size = 1.5,
  numbers = TRUE,
  animated = TRUE,
  animated_h = 4,
  animated_w = 8,
  animated_res = 200,
  frame = NULL
)

Arguments

df_track

A df of tracking data from one play.

orientation

Show lines representing where player is facing (default = T).

dot_size

Size of player dots (default = 6).

segment_length

Length of orientation segment lines (default = 2.5).

segment_size

Width of orientation segment lines (default = 1.5).

numbers

Show player jersey numbers (default = T).

animated

Whether play is animated, rather than a still frame (default = T).

animated_h

If animated, height of animated image (default = 4).

animated_w

If animated, width of animated image (default = 8).

animated_res

If animated, resolution of animated image (default = 200).

frame

frame_id to plot (default = NULL, ie plot all provided frames).


guga31bb/ngscleanR documentation built on Dec. 20, 2021, 1:47 p.m.