Skip to content

Commit

Permalink
ENH: add colors for SHW and LAW (#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
pesaventofilippo authored Aug 28, 2023
1 parent 8a5d575 commit 2cf5d23
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions fastf1/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def warn_change(self):
"nyck de vries": "#1e3d61",
"yuki tsunoda": "#356cac",
"daniel ricciardo": "#2b4562",
"liam lawson": "#2b4562",

"pierre gasly": "#0090ff",
"esteban ocon": "#70c2ff",
Expand All @@ -112,6 +113,7 @@ def warn_change(self):

"charles leclerc": "#dc0000",
"carlos sainz": "#ff8181",
"robert shwartzman": "#9c0000",

"kevin magnussen": "#ffffff",
"nico hulkenberg": "#cacaca",
Expand All @@ -133,13 +135,16 @@ def warn_change(self):

DRIVER_TRANSLATE: Dict[str, str] = {
'LEC': 'charles leclerc', 'SAI': 'carlos sainz',
'SHW': 'robert shwartzman',
'VER': 'max verstappen', 'PER': 'sergio perez',
'PIA': 'oscar piastri', 'NOR': 'lando norris',
'GAS': 'pierre gasly', 'OCO': 'esteban ocon',
'BOT': 'valtteri bottas', 'ZHO': 'zhou guanyu',
'DEV': 'nyck de vries', 'TSU': 'yuki tsunoda', 'RIC': 'daniel ricciardo',
'DEV': 'nyck de vries', 'TSU': 'yuki tsunoda',
'RIC': 'daniel ricciardo', 'LAW': 'liam lawson',
'MAG': 'kevin magnussen', 'HUL': 'nico hulkenberg',
'ALO': 'fernando alonso', 'STR': 'lance stroll', 'DRU': 'felipe drugovich',
'ALO': 'fernando alonso', 'STR': 'lance stroll',
'DRU': 'felipe drugovich',
'HAM': 'lewis hamilton', 'RUS': 'george russell',
'ALB': 'alexander albon', 'SAR': 'logan sargeant'}
"""Mapping of driver names to theirs respective abbreviations."""
Expand Down

0 comments on commit 2cf5d23

Please sign in to comment.