os_overlay_data: Generate data suitable for creating a court overlay plot

Description Usage Arguments Value

View source: R/plot.R

Description

Generate data suitable for creating a court overlay plot

Usage

1
os_overlay_data(court = "tennis", space = "court", court_ref, crop = TRUE)

Arguments

court

string: court to plot, currently only "tennis"

space

string: if "court", the data will be in court coordinates. If "image", the data will be transformed to image coordinates via ovideo::ov_transform_points()

court_ref

data.frame: as returned by os_shiny_court_ref(). Only required if space is "image"

crop

logical: if space is "image", and crop is TRUE, the data will be cropped to the c(0, 1, 0, 1) bounding box (i.e. the limits of the image, in normalized coordinates). Requires that the sf package be installed

Value

A list of data.frames


openvolley/opensportml documentation built on Jan. 26, 2021, 1:34 a.m.