Sets the chart's trace colours to the teams' colours, in order.
Usage
sdv_colorway(
p,
league,
teams = NULL,
which = c("primary", "secondary"),
season = NULL,
id_system = "auto"
)Arguments
- p
A plotly object.
- league
A league key from
sdv_leagues(). Required: one abbreviation means different teams in different leagues.- teams
Team identifiers, or
NULLfor every team.- which
"primary"or"secondary".- season
NULLfor today's mark, or a season (or one per team): the mark the team wore that season where the archive dates its marks.- id_system
For headshots, as in
sdv_headshot_url().
Examples
# \donttest{
if (requireNamespace("plotly", quietly = TRUE)) {
plotly::plot_ly(type = "bar") |> sdv_colorway("nfl", c("KC", "BUF"))
}
# }
