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.framecontaining at leastloc_x,loc_y, andshot_made_flagcolumns (plus optionalshot_distance,shot_value, andgame_datefor tooltips).- interactive
logicalWhether to return an interactive Plotly chart (TRUE) or a static ggplot2 plot (FALSE). Defaults toTRUE.- title
A
characterstring 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).