[Bug]: Icons do not work with GTK · Issue #29229 · matplotlib/matplotlib · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

[Bug]: Icons do not work with GTK #29229

Closed
@bakku

Description

@bakku

Bug summary

When using GTK as backend, a bunch of warnings are shown in the terminal due to missing icons and the UI does not show icons in the toolbar.

Code for reproduction

import matplotlib.pyplot as plt

plt.plot([1, 2, 3, 5])
plt.ylabel('some numbers')
plt.show()

Actual outcome

(python:35385): Gtk-WARNING **: 22:07:42.455: Failed to load icon <path_to_project>/venv/lib/python3.13/site-packages/matplotlib/mpl-data/images/home-symbolic.svg: Failed to open file “<path_to_project>/venv/lib/python3.13/site-packages/matplotlib/mpl-data/images/home-symbolic.svg”: No such file or directory

(python:35385): Gtk-WARNING **: 22:07:42.455: Failed to load icon <path_to_project>/venv/lib/python3.13/site-packages/matplotlib/mpl-data/images/back-symbolic.svg: Failed to open file “<path_to_project>/venv/lib/python3.13/site-packages/matplotlib/mpl-data/images/back-symbolic.svg”: No such file or directory

(python:35385): Gtk-WARNING **: 22:07:42.455: Failed to load icon <path_to_project>/venv/lib/python3.13/site-packages/matplotlib/mpl-data/images/forward-symbolic.svg: Failed to open file “<path_to_project>/venv/lib/python3.13/site-packages/matplotlib/mpl-data/images/forward-symbolic.svg”: No such file or directory

(python:35385): Gtk-WARNING **: 22:07:42.455: Failed to load icon<path_to_project>/venv/lib/python3.13/site-packages/matplotlib/mpl-data/images/move-symbolic.svg: Failed to open file “<path_to_project>/venv/lib/python3.13/site-packages/matplotlib/mpl-data/images/move-symbolic.svg”: No such file or directory

(python:35385): Gtk-WARNING **: 22:07:42.455: Failed to load icon <path_to_project>/venv/lib/python3.13/site-packages/matplotlib/mpl-data/images/zoom_to_rect-symbolic.svg: Failed to open file “<path_to_project>/venv/lib/python3.13/site-packages/matplotlib/mpl-data/images/zoom_to_rect-symbolic.svg”: No such file or directory

(python:35385): Gtk-WARNING **: 22:07:42.455: Failed to load icon <path_to_project>/venv/lib/python3.13/site-packages/matplotlib/mpl-data/images/subplots-symbolic.svg: Failed to open file “<path_to_project>/venv/lib/python3.13/site-packages/matplotlib/mpl-data/images/subplots-symbolic.svg”: No such file or directory

(python:35385): Gtk-WARNING **: 22:07:42.455: Failed to load icon <path_to_project>/venv/lib/python3.13/site-packages/matplotlib/mpl-data/images/filesave-symbolic.svg: Failed to open file “<path_to_project>/venv/lib/python3.13/site-packages/matplotlib/mpl-data/images/filesave-symbolic.svg”: No such file or directory

image

Expected outcome

Icons are shown properly

Additional information

Steps:

python -m venv venv
. venv/bin/activate
pip install -U pip
pip install -U matplotlib
pip install -U PyGObject

# put code for reproduction in a file `main.py`

python main.py

Operating system

Ubuntu

Matplotlib Version

3.9.3

Matplotlib Backend

gtk4agg

Python version

3.13.0

Jupyter version

No response

Installation

pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      TMZ Celebrity News – Breaking Stories, Videos & Gossip

      Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

      Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

      🎥 Watch TMZ Live

      TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.