Create and return a shot chart for the given shot data, either as an
interactive Plotly object or a static ggplot2 plot.
Internally calls process_shots()
to prepare the data, then overlays the shots on the
half‑court background.
Arguments
- shot_data
A
data.frame
containing at leastloc_x
,loc_y
, andshot_made_flag
columns (plus optionalshot_distance
,shot_value
, andgame_date
for tooltips).- interactive
logical
Whether to return an interactive Plotly chart (TRUE
) or a static ggplot2 plot (FALSE
). Defaults toTRUE
.- title
A
character
string to use as the chart title. Defaults toNULL
.
Value
If process_shots()
returns a data frame, that data frame is returned.
Otherwise, returns a ggplot2
object (when
interactive = FALSE
) or a Plotly object (when
interactive = TRUE
).