Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 53b5ed9

Browse files
committed
Clarify allowable backend switches in matplotlib.use().
1 parent 8fec6ea commit 53b5ed9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/matplotlib/__init__.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,11 +1074,16 @@ def use(backend, *, force=True):
10741074
10751075
or a string of the form: ``module://my.module.name``.
10761076
1077+
Switching to an interactive backend is not possible if an unrelated
1078+
event loop has already been started (e.g., switching to GTK3Agg if a
1079+
TkAgg window has already been opened). Switching to a non-interactive
1080+
backend is always possible.
1081+
10771082
force : bool, default: True
10781083
If True (the default), raise an `ImportError` if the backend cannot be
10791084
set up (either because it fails to import, or because an incompatible
1080-
GUI interactive framework is already running); if False, ignore the
1081-
failure.
1085+
GUI interactive framework is already running); if False, silently
1086+
ignore the failure.
10821087
10831088
See Also
10841089
--------

0 commit comments

Comments
 (0)