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

Skip to content

Commit a8bc53a

Browse files
committed
Reword docs about fallbacks on headless linux.
$DISPLAY (or $WAYLAND_DISPLAY) is not the only thing we consider; we also check that one can indeed connect to the display server. (But there's no point of writing a full explanation of the Linux display protocols; there's much better docs for that elsewhere online.)
1 parent 57489bf commit a8bc53a

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

doc/faq/environment_variables_faq.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,6 @@ Environment variables
77
.. contents::
88
:backlinks: none
99

10-
11-
.. envvar:: DISPLAY
12-
13-
The server and screen on which to place windows. This is interpreted by GUI
14-
toolkits in a backend-specific manner, but generally refers to an `X.org
15-
display name
16-
<https://www.x.org/releases/X11R7.7/doc/man/man7/X.7.xhtml#heading5>`_.
17-
1810
.. envvar:: HOME
1911

2012
The user's home directory. On Linux, :envvar:`~ <HOME>` is shorthand for :envvar:`HOME`.

tutorials/introductory/usage.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,10 @@ def my_plotter(ax, data1, data2, param_dict):
299299
#
300300
# Without a backend explicitly set, Matplotlib automatically detects a usable
301301
# backend based on what is available on your system and on whether a GUI event
302-
# loop is already running. On Linux, if the environment variable
303-
# :envvar:`DISPLAY` is unset, the "event loop" is identified as "headless",
304-
# which causes a fallback to a noninteractive backend (agg); in all other
305-
# cases, an interactive backend is preferred (usually, at least tkagg will be
306-
# available).
302+
# loop is already running. An interactive backend is usually preferred (at
303+
# least tkagg should be available); as an exception, on Linux, if Matplotlib
304+
# cannot connect to either an X display or a Wayland display, the system is
305+
# considered "headless" and a noninteractive backend (agg) is used.
307306
#
308307
# Here is a detailed description of the configuration methods:
309308
#

0 commit comments

Comments
 (0)