Skip to content

Commit

Permalink
Merge pull request #15 from UnravelSports/feat/pressing-intensity
Browse files Browse the repository at this point in the history
Feat/pressing intensity
  • Loading branch information
UnravelSports authored Feb 15, 2025
2 parents 32b362e + e9c110e commit 7359b4a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 118 deletions.
113 changes: 25 additions & 88 deletions examples/pressing_intensity.ipynb

Large diffs are not rendered by default.

30 changes: 0 additions & 30 deletions unravel/utils/display/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,33 +63,3 @@ def __post_init__(self):
class GameColors:
home_team: TeamColors
away_team: TeamColors


YlRd = ["#F7FBFF", "#FFEDA0", "#FEB24C", "#FD8D3C", "#E31A1C", "#BD0026", "#800026"]


@dataclass
class ColorMaps:
_YlRd = ["#FFFF00", "#FF0000"] # Replace with actual YlRd values

@property
def YELLOW_RED(self):
try:
from matplotlib.colors import LinearSegmentedColormap

return LinearSegmentedColormap.from_list("", self._YlRd)
except ImportError:
raise ImportError(
"Seems like you don't have matplotlib installed. Please install it using: pip install matplotlib"
)

@property
def YELLOW_RED_R(self):
try:
from matplotlib.colors import LinearSegmentedColormap

return LinearSegmentedColormap.from_list("", list(reversed(self._YlRd)))
except ImportError:
raise ImportError(
"Seems like you don't have matplotlib installed. Please install it using: pip install matplotlib"
)

0 comments on commit 7359b4a

Please sign in to comment.