View source: R/plot_timeline.r
| plot_timeline | R Documentation | 
This function allows to make match timelines using data collected event-by-event.
plot_timeline(
  data,
  match_year,
  team_home,
  team_away,
  color_home,
  color_away,
  theme = ""
)
| data | Data, for now only compatible with understat data. | 
| match_year | the year the match was played. | 
| team_home | home team according to data. | 
| team_away | away team according to data. | 
| color_home | line colour for the home team. | 
| color_away | line colour for the away team. | 
| theme | Choose from 4 ggplot2 themes -> dark, almond, rose, white. | 
ggplot2 object of a xG timeline plot
## Not run: 
plot <- plot_timeline(data = data, match_year = 2021, 
                      team_home = "Manchester United", team_away = "Liverpool",
                      color_home = "#e31a1c", color_away = "#980043", theme = "dark")
plot
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.