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

Skip to content

Commit ebc9277

Browse files
authored
Merge pull request #19829 from meeseeksmachine/auto-backport-of-pr-19822-on-v3.4.x
Backport PR #19822 on branch v3.4.x (Clarify default backend selection doc.)
2 parents 9e4446a + f448ca0 commit ebc9277

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

doc/sphinxext/custom_roles.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ def rcparam_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
1616

1717
ref = nodes.reference(rawtext, rendered, refuri=refuri)
1818
node_list = [nodes.literal('', '', ref)]
19-
if text in rcParamsDefault:
19+
# The default backend would be printed as "agg", but that's not correct (as
20+
# the default is actually determined by fallback).
21+
if text in rcParamsDefault and text != "backend":
2022
node_list.extend([
2123
nodes.Text(' (default: '),
2224
nodes.literal('', repr(rcParamsDefault[text])),

tutorials/introductory/usage.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,9 @@ def my_plotter(ax, data1, data2, param_dict):
304304
# backend based on what is available on your system and on whether a GUI event
305305
# loop is already running. On Linux, if the environment variable
306306
# :envvar:`DISPLAY` is unset, the "event loop" is identified as "headless",
307-
# which causes a fallback to a noninteractive backend (agg).
307+
# which causes a fallback to a noninteractive backend (agg); in all other
308+
# cases, an interactive backend is preferred (usually, at least tkagg will be
309+
# available).
308310
#
309311
# Here is a detailed description of the configuration methods:
310312
#

0 commit comments

Comments
 (0)