Learn R Programming

SpatialBall (version 0.1.0)

ShotSeasonGraph: plot the shot chart of a whole NBA Season

Description

This function takes an NBA season object and makes a shot chart of all the shots takes through that regular season. You can choose to either plot the results based on Points per Shot or on Shooting Percentage

Usage

ShotSeasonGraph(Seasondata, quant = 0.4, type = "PPS")

Arguments

Seasondata

The information of shots, it can be downloaded with function read_season

quant

A number between 0 and 1, it determines quantile of shots used to plot the shot chart, (default is 0.4)

type

A character to specify if the shot chart is based on Points per Shot ("PPS") or percentage ("PCT")

Value

a ggplot object plotting the shot chart of a given NBA season

See Also

DefShotSeasonGraphTeam

OffShotSeasonGraphTeam

Examples

Run this code
# NOT RUN {
data("season2017")
ShotSeasonGraph(season2017, quant = 0.4)
ShotSeasonGraph(season2017, quant = 0.4, type = "PCT")
# }

Run the code above in your browser using DataLab