diff --git a/doc/sphinxext/custom_roles.py b/doc/sphinxext/custom_roles.py index 5faa42172a64..0734f2b15ac3 100644 --- a/doc/sphinxext/custom_roles.py +++ b/doc/sphinxext/custom_roles.py @@ -16,7 +16,9 @@ def rcparam_role(name, rawtext, text, lineno, inliner, options={}, content=[]): ref = nodes.reference(rawtext, rendered, refuri=refuri) node_list = [nodes.literal('', '', ref)] - if text in rcParamsDefault: + # The default backend would be printed as "agg", but that's not correct (as + # the default is actually determined by fallback). + if text in rcParamsDefault and text != "backend": node_list.extend([ nodes.Text(' (default: '), nodes.literal('', repr(rcParamsDefault[text])), diff --git a/tutorials/introductory/usage.py b/tutorials/introductory/usage.py index 2403d3f0ba5b..5f234e366ce6 100644 --- a/tutorials/introductory/usage.py +++ b/tutorials/introductory/usage.py @@ -304,7 +304,9 @@ def my_plotter(ax, data1, data2, param_dict): # backend based on what is available on your system and on whether a GUI event # loop is already running. On Linux, if the environment variable # :envvar:`DISPLAY` is unset, the "event loop" is identified as "headless", -# which causes a fallback to a noninteractive backend (agg). +# which causes a fallback to a noninteractive backend (agg); in all other +# cases, an interactive backend is preferred (usually, at least tkagg will be +# available). # # Here is a detailed description of the configuration methods: #