-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deal with matplotlib 3.6 deprecation/rename of seaborn-colorblind
Matplotlib changed the name of our default colour theme (presumably to be future-proof against defaults of later seaborn versions?)
- Loading branch information
Showing
5 changed files
with
23 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
"""Utility functions used by command-line tools""" | ||
|
||
import matplotlib | ||
from packaging.version import Version | ||
|
||
def get_default_style() -> str: | ||
"""Get appropriate name for seaborn-colorblind, depending on MPL version""" | ||
|
||
if Version(matplotlib) < Version("3.6"): | ||
return "seaborn-colorblind" | ||
|
||
return "seaborn-v0_8-colorblind" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters