Elffuss BraidHub

kikocis/auto-code-rover public

main · 1.2 KiBRawPermalink
1[Bug]: Setting matplotlib.pyplot.style.library['seaborn-colorblind'] result in key error on matplotlib v3.6.1
2### Bug summary
3
4I have code that executes:
5```
6import matplotlib.pyplot as plt
7the_rc = plt.style.library["seaborn-colorblind"]
8```
9
10Using version 3.4.3 of matplotlib, this works fine. I recently installed my code on a machine with matplotlib version 3.6.1 and upon importing my code, this generated a key error for line `the_rc = plt.style.library["seaborn-colorblind"]` saying "seaborn-colorblind" was a bad key.
11
12### Code for reproduction
13
14```python
15import matplotlib.pyplot as plt
16the_rc = plt.style.library["seaborn-colorblind"]
17```
18
19
20### Actual outcome
21
22Traceback (most recent call last):
23KeyError: 'seaborn-colorblind'
24
25### Expected outcome
26
27seaborn-colorblind should be set as the matplotlib library style and I should be able to continue plotting with that style.
28
29### Additional information
30
31- Bug occurs with matplotlib version 3.6.1
32- Bug does not occur with matplotlib version 3.4.3
33- Tested on MacOSX and Ubuntu (same behavior on both)
34
35### Operating system
36
37OS/X
38
39### Matplotlib Version
40
413.6.1
42
43### Matplotlib Backend
44
45MacOSX
46
47### Python version
48
493.9.7
50
51### Jupyter version
52
53_No response_
54
55### Installation
56
57pip