I cannot get a graph to show in version 23.04 (22.10 did)

Bug #2017309 reported by Cees van Beek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
matplotlib (Ubuntu)
New
Undecided
Unassigned

Bug Description

In Python3 you can repreduce the problem with the next script:

import matplotlib.pyplot as plt
plt.plot((1,4,6))
plt.show()

This gives the following errors (and no showing of the graph):

Traceback (most recent call last):
  File "/home/cees/prive/lin_prog/prog/test.py", line 123, in <module>
    plt.plot((1,4,6))
  File "/home/cees/.virtualenvs/lin_prog/lib/python3.11/site-packages/matplotlib/pyplot.py", line 2748, in plot
    return gca().plot(
           ^^^^^
  File "/home/cees/.virtualenvs/lin_prog/lib/python3.11/site-packages/matplotlib/pyplot.py", line 2245, in gca
    return gcf().gca()
           ^^^^^
  File "/home/cees/.virtualenvs/lin_prog/lib/python3.11/site-packages/matplotlib/pyplot.py", line 842, in gcf
    return figure()
           ^^^^^^^^
  File "/home/cees/.virtualenvs/lin_prog/lib/python3.11/site-packages/matplotlib/_api/deprecation.py", line 454, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/cees/.virtualenvs/lin_prog/lib/python3.11/site-packages/matplotlib/pyplot.py", line 783, in figure
    manager = new_figure_manager(
              ^^^^^^^^^^^^^^^^^^^
  File "/home/cees/.virtualenvs/lin_prog/lib/python3.11/site-packages/matplotlib/pyplot.py", line 359, in new_figure_manager
    return _get_backend_mod().new_figure_manager(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/cees/.virtualenvs/lin_prog/lib/python3.11/site-packages/matplotlib/backend_bases.py", line 3513, in new_figure_manager
    return cls.new_figure_manager_given_figure(num, fig)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/cees/.virtualenvs/lin_prog/lib/python3.11/site-packages/matplotlib/backend_bases.py", line 3518, in new_figure_manager_given_figure
    return cls.FigureCanvas.new_manager(figure, num)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/cees/.virtualenvs/lin_prog/lib/python3.11/site-packages/matplotlib/backend_bases.py", line 1703, in new_manager
    return cls.manager_class.create_with_canvas(cls, figure, num)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/cees/.virtualenvs/lin_prog/lib/python3.11/site-packages/matplotlib/backend_bases.py", line 2830, in create_with_canvas
    return cls(canvas_class(figure), num)
               ^^^^^^^^^^^^^^^^^^^^
  File "/home/cees/.virtualenvs/lin_prog/lib/python3.11/site-packages/matplotlib/backends/backend_gtk4.py", line 79, in __init__
    css.load_from_data(b".matplotlib-canvas { background-color: white; }")
TypeError: Gtk.CssProvider.load_from_data() takes exactly 3 arguments (2 given)

Process finished with exit code 1

release: 23.04 (this worked in 22.10)
libgtk4: libgtk-4-1/lunar,now 4.10.1+ds-2ubuntu1 amd64
python: python 3.11
matplolib: Version: 3.6.3
matplotlib backend: GTK4Agg

Thanx Cees van Beek

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Libera.chat.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/2017309/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Paul White (paulw2u)
affects: ubuntu → matplotlib (Ubuntu)
tags: added: lunar
summary: - I cannot get a graph show in version 23.03 (22.10 did)
+ I cannot get a graph to show in version 23.03 (22.10 did)
summary: - I cannot get a graph to show in version 23.03 (22.10 did)
+ I cannot get a graph to show in version 23.04 (22.10 did)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.