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

Matplotlib styles bug fix #184

Open
patrickleonardy opened this issue Oct 23, 2023 · 1 comment · May be fixed by #186
Open

Matplotlib styles bug fix #184

patrickleonardy opened this issue Oct 23, 2023 · 1 comment · May be fixed by #186
Assignees
Labels
bug Something isn't working

Comments

@patrickleonardy
Copy link
Contributor

patrickleonardy commented Oct 23, 2023

Bug

The seaborn-ticks and seaborn-whitegrid matplotlib styles which were available in matplotlib 3.4.* are not available since matplotlib 3.6.*, and have been substituted with seaborn-v0_8-ticks and seaborn-v0_8-whitegrid respectively.

The problem is that cobra requirements.txt asks for matplotlib>=3.4.3, which can create the issue if the matplotlib version installed is actually greater than 3.5.* (last version supporting the seaborn-ticks plot style).

Task Description

You can check yourselves in the style files that are linked here below from the matplotlib GitHub repo:

v2.2.* and v3.5.* versus
v3.6.* and v3.8.* (latest)

Regarding Cobra, the files where these styles are used are:

  • ./cobra/evaluation/plotting_utils.py
  • ./cobra/evaluation/pigs_tables.py
  • ./cobra/evaluation/evaluator.py

Solution:

Found where they mention the change in the Matplotlib changelog: https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.6.0.html#seaborn-styles-renamed

matplotlib's team advise is to take the style directly from the seaborn package. Therefore, the solution for the long run should probably not be neither 2 nor 3, although I proposed them haha.

@patrickleonardy patrickleonardy added the bug Something isn't working label Oct 23, 2023
@patrickleonardy patrickleonardy self-assigned this Oct 23, 2023
@patrickleonardy patrickleonardy linked a pull request Oct 24, 2023 that will close this issue
@patrickleonardy patrickleonardy linked a pull request Oct 31, 2023 that will close this issue
@JanBenisek
Copy link
Contributor

Hi, bit of a random message, somehow I got a notification on this PR.
Anyway, as one of the early Cobra devs, I just wanted to say that it is cool to see that Cobra is still alive and actively maintained.
Great job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants