Skip to content

Reword docs about fallbacks on headless linux. #20664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2021
Merged

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jul 18, 2021

$DISPLAY (or $WAYLAND_DISPLAY) is not the only thing we consider; we
also check that one can indeed connect to the display server (#17396). (But
there's no point of writing a full explanation of the Linux display
protocols; there's much better docs for that elsewhere online.)

PR Summary

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

Comment on lines 302 to 305
# loop is already running. An interactive backend is usually preferred (at
# least tkagg should be available); as an exception, on Linux, if Matplotlib
# cannot connect to either an X display or a Wayland display, the system is
# considered "headless" and a noninteractive backend (agg) is used.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be less technical and more to the point? e.g.

Suggested change
# loop is already running. An interactive backend is usually preferred (at
# least tkagg should be available); as an exception, on Linux, if Matplotlib
# cannot connect to either an X display or a Wayland display, the system is
# considered "headless" and a noninteractive backend (agg) is used.
# loop is already running. The following sequence is tried: MacOSX, Qt5Agg, Gtk3Agg, TkAgg, WxAgg, Agg. The last, Agg, is a non-interactive backend that can only write to files. It is used on Linux, if Matplotlib cannot connect to either an X display or a Wayland display.

Sequence taken from matplotlibrc (I don't know if we check that somewhere else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, took that with a very slight rewording.

$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.)
Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anybody can merge after CI pass.

@jklymak jklymak merged commit ca42fca into matplotlib:master Jul 18, 2021
@anntzer anntzer deleted the wd branch July 18, 2021 20:59
@QuLogic QuLogic added this to the v3.5.0 milestone Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants