Description Usage Value Examples
Plot the court markings for the NBA regulation basketball half court.
1 |
Plot of half court
1 2 3 4 5 6 7 8 | sc_data <- shots_cavs
# plot halfcout markings
draw_halfcourt()
# plot data
points(sc_data$LOC_X, sc_data$LOC_Y, cex = 0.5)
# highlight three-pointers
threes <- dplyr::filter(sc_data, SHOT_TYPE == "3PT Field Goal")
points(threes$LOC_X, threes$LOC_Y, cex = 0.5, col = "#FF6688")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.