View source: R/plot_convexhull.R
plot_convexhull | R Documentation |
This function allows for data, that can be from Opta or StatsBomb, to be used for plotting convex hulls on top of an outline of a football pitch.
plot_convexhull(
data,
data_type = "statsbomb",
color = "#E74C3C",
title = "",
theme = "dark"
)
data |
Data frame that houses pass data. Opta dataframe must contain atleast the following columns: |
data_type |
Type of data that is being put in: opta or statsbomb. Default set to "statsbomb" |
color |
The color of the outline of the convex hull |
title |
Title of the plot |
theme |
Indicates what theme the map must be shown in: dark (default), white, rose, almond |
a ggplot2 object
## Not run:
plot <- plot_convexhull(data = data, data_type = "opta", color = "blue", title = "Team 1")
plot
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.