sportsdataverse / sportyR

R package for drawing regulation playing surfaces for several sports
https://sportyR.sportsdataverse.org
GNU General Public License v3.0
103 stars 7 forks source link

geom_basketball NCAA three point line #29

Closed mileskee closed 1 year ago

mileskee commented 1 year ago

Is there a way to only show one of the three point lines when using geom_basketball with the NCAA court?

rossdrucker commented 1 year ago

They'll both be plotted by default, but you can set the color of one of them to be the same as the half court colors that they're on top of

For example, this uses the default colors but will only display one of the three-point arcs:

library(sportyR)

geom_basketball(
  league = "ncaa", 
  color_updates = list(
    three_point_line = c(
      # outer line first, this one will be displayed
      "#000000",
      # inner line same color as background; may need to match to
      # either two-point range or half court colors
      "#d2ab6f"
    )
  )
)

image

Edit: typo