Create a ggplot2 scatter plot object of summary team statistics. Can display a trend line
if desired.
Usage
scatterPlot(
x,
y,
games = "all",
gender = "women",
trend = FALSE,
dynamic = TRUE
)
Arguments
- x
x-axis variable
- y
y-axis variable
- games
graphing 'all' (default), 'conference', or 'nonconference' games. Currently no support for 'nonconference' games
- gender
'women' (default) or 'men'
- trend
TRUE (default) for smoothing trend line, FALSE for no trend line
Value
a ggplot2 scatter plot object
Examples
scatterPlot(x="Assists", y="PenaltyMinutes")
scatterPlot(x="Goals", y="Assists", games="conference", gender="men", trend=TRUE)
#> `geom_smooth()` using method = 'loess' and formula 'y ~ x'