| 1 | [Bug]: Setting matplotlib.pyplot.style.library['seaborn-colorblind'] result in key error on matplotlib v3.6.1 |
| 2 | ### Bug summary |
| 3 | |
| 4 | I have code that executes: |
| 5 | ``` |
| 6 | import matplotlib.pyplot as plt |
| 7 | the_rc = plt.style.library["seaborn-colorblind"] |
| 8 | ``` |
| 9 | |
| 10 | Using 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 |
| 15 | import matplotlib.pyplot as plt |
| 16 | the_rc = plt.style.library["seaborn-colorblind"] |
| 17 | ``` |
| 18 | |
| 19 | |
| 20 | ### Actual outcome |
| 21 | |
| 22 | Traceback (most recent call last): |
| 23 | KeyError: 'seaborn-colorblind' |
| 24 | |
| 25 | ### Expected outcome |
| 26 | |
| 27 | seaborn-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 | |
| 37 | OS/X |
| 38 | |
| 39 | ### Matplotlib Version |
| 40 | |
| 41 | 3.6.1 |
| 42 | |
| 43 | ### Matplotlib Backend |
| 44 | |
| 45 | MacOSX |
| 46 | |
| 47 | ### Python version |
| 48 | |
| 49 | 3.9.7 |
| 50 | |
| 51 | ### Jupyter version |
| 52 | |
| 53 | _No response_ |
| 54 | |
| 55 | ### Installation |
| 56 | |
| 57 | pip |