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

Skip to content

Tweak minimal checks for GUI binding installs. #29821

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
Mar 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions galleries/users_explain/figure/backends.rst
Original file line number Diff line number Diff line change
Expand Up @@ -292,14 +292,12 @@ program that can be run to test basic functionality. If this test fails, try re
QtAgg, QtCairo, Qt5Agg, and Qt5Cairo
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Test ``PyQt5``.

If you have ``PySide`` or ``PyQt6`` installed rather than ``PyQt5``, just change the import
accordingly:
Test ``PyQt6`` (if you have ``PyQt5``, ``PySide2`` or ``PySide6`` installed
rather than ``PyQt6``, just change the import accordingly):

.. code-block:: bash

python -c "from PyQt5.QtWidgets import *; app = QApplication([]); win = QMainWindow(); win.show(); app.exec()"
python3 -c "from PyQt6.QtWidgets import *; app = QApplication([]); win = QMainWindow(); win.show(); app.exec()"


TkAgg and TkCairo
Expand All @@ -325,14 +323,9 @@ wxAgg and wxCairo

Test ``wx``:

.. code-block:: python3

import wx
.. code-block:: bash

app = wx.App(False) # Create a new app, don't redirect stdout/stderr to a window.
frame = wx.Frame(None, wx.ID_ANY, "Hello World") # A Frame is a top-level window.
frame.Show(True) # Show the frame.
app.MainLoop()
python3 -c "import wx; app = wx.App(); frame = wx.Frame(None); frame.Show(); app.MainLoop()"

If the test works for your desired backend but you still cannot get Matplotlib to display a figure, then contact us (see
:ref:`get-help`).