Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] 2024 team colors #523

Closed
formulatimer opened this issue Feb 21, 2024 · 6 comments
Closed

[ENH] 2024 team colors #523

formulatimer opened this issue Feb 21, 2024 · 6 comments
Labels
maintenance Changes required to gurantee that things work properly in the future still
Milestone

Comments

@formulatimer
Copy link
Contributor

Proposed new feature or change:

Since version 3.3, the colors for AlphaTauri and Sauber have not been available, causing errors in ff1.plotting.team_color() for the years 2023, 2022, 2021, and so forth.
I have read the release document for version 3.3, and you are aware of it. However adding the colors for AlphaTauri and Sauber resolves the issue, and the year 2024 is not affected.

Here, I present my proposal, which is very easy to implement:

TEAM_COLORS = __TeamColorsWarnDict({
    'mercedes': '#00d2be', 'ferrari': '#dc0000',
    'red bull': '#fcd700', 'mclaren': '#ff8700',
    'alpine': '#fe86bc', 'aston martin': '#006f62',
    'sauber': '#00e701', 'visa rb': '#1634cb',
    'haas': '#ffffff', 'williams': '#00a0dd',
    'alfa romeo': '#00e701', 'alphatauri': '#1634cb'
})
@formulatimer formulatimer changed the title [ENH] 2024 colors [ENH] 2024 team colors Feb 21, 2024
@pesaventofilippo
Copy link
Contributor

I don't really agree with this change. The problem is, "Visa RB" and "AlphaTauri" are the same team, so they have the same color. But the color for this year's RB is different than last year's AlphaTauri, so if you want to use colors for the last season, the AlphaTauri color would be wrong. Same for the Sauber/Alfa Romeo team.

And the same goes for all the other teams: they are correct colors for this season, but for the 2023 season and back, they are wrong colors, even if the team name didn't change. So, for this reason, I think it's actually best to only support the 2024 season instead of technically supporting the previous seasons with wrong colors, at least until we figure out how to automatically generate colors (see #480 and #218)

@theOehrly
Copy link
Owner

Only the two renamed teams changed their colors, no? Yes, I modified other colors as well, for readability. But they are still valid for last season. So technically, this might work.

But I'm unsure whether this change might have unintended consequences. It might cause some confusion/problems, having team names in there that aren't from the current season. Even if it is not a problem in FastF1, users might rely on the fact that only the current teams are listed there. Therefore, I went with the option of breaking last season in favour of expected behaviour for this season, where most analysis will be done at the moment.
Proper support for multiple seasons isn't that far away anyway.

@pesaventofilippo
Copy link
Contributor

Only the two renamed teams changed their colors, no?

Actually no, if you get the teams' colors from the livetiming API, many teams have changed, if not all. For example, Ferrari has changed even if the livery is quite similar. Williams, Alpine and others also changed (Alpine is pink now, I'm not sure if it will revert to a shade of blue after the first races)

@theOehrly
Copy link
Owner

Yes, but I'm not using the official colors anyway. There's a good reason for that too. They are using slightly muted colors in their color scheme and although kind of nice, the contrast is worse in plots, meaning that readability suffers. I also made Red Bull yellow now, after all, it's one of their contrast colors and makes them much easier to distinguish from the other blue teams.

(There will be an "official" colormap as alternative in the future if you really want the official colors)

@formulatimer
Copy link
Contributor Author

I have changed the plotting.py file in my computer. I just opened the issue because I thought it could be interesting for other users.

Feel free to close the issue

@theOehrly theOehrly added this to the v3.4.0 milestone Jul 13, 2024
@theOehrly theOehrly added the maintenance Changes required to gurantee that things work properly in the future still label Jul 13, 2024
@theOehrly
Copy link
Owner

As of v3.4.0 and #585, team colours are now properly supported for all seasons since 2018.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Changes required to gurantee that things work properly in the future still
Projects
None yet
Development

No branches or pull requests

3 participants