Repository navigation
Commit e60c06a
authored
Delay import from matplotlib_inline.backend_inline (#14330)
Possible fix for #14329.
With this change, the reproducers from the issue become:
```python
$ ipython
<snip>
In [1]: import matplotlib.pyplot as plt; plt.set_loglevel("debug")
In [2]: %matplotlib tk
DEBUG:matplotlib.pyplot:Loaded backend TkAgg version 8.6.
```
It is still possible to call `matplotlib.pyplot.switch_backend` twice
but only if you request `%matplotlib inline`, and the `switch_backend`
is called with same correct backend twice. This isn't ideal but it
doesn't cause any problems apart from being a little slower than
necessary.1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3654 | 3654 | | |
3655 | 3655 | | |
3656 | 3656 | | |
3657 | | - | |
3658 | | - | |
3659 | 3657 | | |
3660 | 3658 | | |
3661 | 3659 | | |
| |||
3670 | 3668 | | |
3671 | 3669 | | |
3672 | 3670 | | |
| 3671 | + | |
| 3672 | + | |
| 3673 | + | |
3673 | 3674 | | |
3674 | 3675 | | |
3675 | 3676 | | |
| |||
0 commit comments