MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / get_backend

Function get_backend

lib/matplotlib/__init__.py:1292–1322  ·  view source on GitHub ↗

Return the name of the current backend. Parameters ---------- auto_select : bool, default: True Whether to trigger backend resolution if no backend has been selected so far. If True, this ensures that a valid backend is returned. If False, this returns None

(*, auto_select=True)

Source from the content-addressed store, hash-verified

1290
1291
1292def get_backend(*, auto_select=True):
1293 """
1294 Return the name of the current backend.
1295
1296 Parameters
1297 ----------
1298 auto_select : bool, default: True
1299 Whether to trigger backend resolution if no backend has been
1300 selected so far. If True, this ensures that a valid backend
1301 is returned. If False, this returns None if no backend has been
1302 selected so far.
1303
1304 .. versionadded:: 3.10
1305
1306 .. admonition:: Provisional
1307
1308 The *auto_select* flag is provisional. It may be changed or removed
1309 without prior warning.
1310
1311 See Also
1312 --------
1313 matplotlib.use
1314 """
1315 if auto_select:
1316 return rcParams['backend']
1317 else:
1318 backend = rcParams._get('backend')
1319 if backend is rcsetup._auto_backend_sentinel:
1320 return None
1321 else:
1322 return backend
1323
1324
1325def interactive(b):

Callers 2

install_repl_displayhookFunction · 0.90
resolve_backendMethod · 0.90

Calls 1

_getMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…