drawNBAcourt: Add lines of NBA court to an existing ggplot2 plot

View source: R/drawNBAcourt.R

drawNBAcourtR Documentation

Add lines of NBA court to an existing ggplot2 plot

Description

Add lines of NBA court to an existing ggplot2 plot

Usage

drawNBAcourt(p, size = 1.5, col = "black", full = FALSE)

Arguments

p

a ggplot2 object.

size

numeric, line size.

col

line color.

full

logical; if TRUE draws a complete NBA court; if FALSE draws a half court.

Value

A ggplot2 object

Author(s)

Marco Sandri, Paola Zuccolotto, Marica Manisera (basketballanalyzer.help@unibs.it)

Examples

library(ggplot2)
p <- ggplot(data.frame(x=0, y=0), aes(x,y)) + coord_fixed()
drawNBAcourt(p)

sndmrc/BasketAnalyzeR documentation built on June 6, 2023, 12:52 a.m.