GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — DOC: explain WSL GUI backend setup by SIBTAIN-ASAD · Pull Request #32386 · matplotlib/matplotlib

Conversation

@SIBTAIN-ASAD

@SIBTAIN-ASAD SIBTAIN-ASAD commented Sep 23, 2026

Copy link
Copy Markdown

Closes #32381

Matplotlib can use the GUI environment provided by WSLg when a supported toolkit is installed, but the backend guide did not explain the setup or how to diagnose a missing display.

This adds a focused WSL section to the backend troubleshooting guide covering:

  • WSLg and the display variables it provides
  • checking for a supported GUI toolkit and the selected backend
  • using the non-interactive Agg backend in headless WSL environments

Verification:

  • git diff --check
  • Full Sphinx documentation build not run locally because the documentation dependencies are not installed in this environment.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@SIBTAIN-ASAD
docs: explain WSL GUI backend setup
c95e91d
@github-actions

github-actions Bot commented Sep 23, 2026

Copy link
Copy Markdown

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks. We also ask that you please finish addressing any review comments on this PR and wait for it to be merged (or closed) before opening a new one, as it can be a valuable learning experience to go through the review process.

You can also join us on discourse chat for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide.
Please let us know if (and how) you use AI, it will help us give you better feedback on your PR.

We strive to be a welcoming and open project. Please follow our Code of Conduct.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added first-contribution Documentation: user guide files in galleries/users_explain or doc/users labels Sep 23, 2026
@SIBTAIN-ASAD

SIBTAIN-ASAD commented Sep 23, 2026

Copy link
Copy Markdown
Author

For transparency: I used AI assistance to review the repository guidance and help structure the documentation wording. I reviewed the final diff, kept the scope limited to the WSL backend guide, and ran git diff --check before submitting.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@scottshambaugh

scottshambaugh commented Sep 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

This needs some work. It does not tell users how to see if WSLg is available, how to set those env variables, or how to persist this setup. I think this is not an appropriate section of docs to use AI to write (even more so than usual) - it needs someone working through it from scratch from the user's perspective to ensure all steps are covered.

I'm going to mark this as an autoclose candidate unless it's updated to show that a human wrote it and worked through the written process.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@scottshambaugh scottshambaugh added the status: autoclose candidate PRs that are not yet ready for review and may be automatically closed in two weeks label Sep 23, 2026
@github-actions

github-actions Bot commented Sep 23, 2026

Copy link
Copy Markdown

⏰ This pull request might be automatically closed in two weeks from now.

Thank you for your contribution to Matplotlib and for the effort you have put into this PR. This pull request does not yet meet the quality and clarity standards needed for an effective review. Project maintainers have limited time for code reviews, and our goal is to prioritize well-prepared contributions to keep Matplotlib maintainable.

Matplotlib maintainers cannot provide one-to-one guidance on this PR. However, if you ask focused, well-researched questions, a community member may be willing to help. 💬

To increase the chance of a productive review:

  • Use the template provided in the PR description and fill it out as completely as possible, especially the summary and AI Disclosure sections.
  • Make sure your PR conforms to our PR checklist.

As the author, you are responsible for driving this PR, which entails doing necessary background research as well as presenting its context and your thought process. If you are a new contributor, or do not know how to fulfill these requirements, we recommend that you familiarize yourself with Matplotlib's development conventions or engage with the community via our Discourse or one of our meetings before submitting code.

If you substantially improve this PR within two weeks, leave a comment and a team member may remove the status: autoclose candidate label and the PR stays open. Cosmetic changes or incomplete fixes will not be sufficient. Maintainers will assess improvements on their own schedule. Please do not ping (@) maintainers.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rcomer

rcomer commented Sep 23, 2026

Copy link
Copy Markdown
Member

I will add that the addition does not belong where it is. It breaks up an existing section and makes it look like the notebook, etc. troubleshooting steps are specific to WSL.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tacaswell

tacaswell commented Sep 23, 2026

Copy link
Copy Markdown
Member

I would put it around L203.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@SIBTAIN-ASAD
Move WSL backend guidance next to backend selection
61e03f3
@SIBTAIN-ASAD

SIBTAIN-ASAD commented Sep 25, 2026

Copy link
Copy Markdown
Author

Thanks for the guidance. I moved the WSL section next to the backend-selection guidance (around the requested location) so it no longer interrupts the troubleshooting flow. The section now links back to the backend selection and builtin-backend guidance, and the change is pushed in 61e03f3.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tacaswell
tacaswell reviewed Sep 25, 2026
View reviewed changes
Comment thread galleries/users_explain/figure/backends.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@SIBTAIN-ASAD
Shorten WSL backend guidance
399236a
@SIBTAIN-ASAD

SIBTAIN-ASAD commented Sep 26, 2026

Copy link
Copy Markdown
Author

That makes sense. I reduced the WSL guidance to a short note covering WSLg, the DISPLAY/WAYLAND_DISPLAY check, and the headless Agg fallback. The update is pushed in 399236a.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@scottshambaugh scottshambaugh removed the status: autoclose candidate PRs that are not yet ready for review and may be automatically closed in two weeks label Oct 1, 2026
story645
story645 reviewed Nov 11, 2026
View reviewed changes

@story645 story645 left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

sorry this got stalled

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread galleries/users_explain/figure/backends.rst Outdated
Comment on lines +118 to +131
``WAYLAND_DISPLAY`` is set in the shell where Python is started. You can
inspect the selected backend with:

.. code-block:: python3

import matplotlib

print(matplotlib.get_backend())

If no display is available (for example, when running a script in a headless
WSL environment), select the non-interactive ``Agg`` backend and save figures
to files instead. See :ref:`the-builtin-backends` for the available
interactive backends and :ref:`selecting-a-backend` for ways to configure a
backend explicitly.

@story645 story645 Nov 11, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This is generic advice for all the backends, so can it be factored out that way?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tacaswell tacaswell tacaswell left review comments
@story645 story645 story645 left review comments

At least 1 approving review is required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

Documentation: user guide files in galleries/users_explain or doc/users first-contribution

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[ENH]: WSL support

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@SIBTAIN-ASAD @scottshambaugh @rcomer @tacaswell @story645
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.