GNU bug report logs - #20888
matplotlib broken

Previous Next

Package: guix;

Reported by: Federico Beffa <beffa <at> ieee.org>

Date: Wed, 24 Jun 2015 07:01:03 UTC

Severity: normal

Done: Federico Beffa <beffa <at> ieee.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20888 in the body.
You can then email your comments to 20888 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#20888; Package guix. (Wed, 24 Jun 2015 07:01:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Federico Beffa <beffa <at> ieee.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 24 Jun 2015 07:01:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Federico Beffa <beffa <at> ieee.org>
To: bug-guix <at> gnu.org
Subject: matplotlib broken
Date: Wed, 24 Jun 2015 08:59:54 +0200
I was a happy matplotlib user. Unfortunately, recently it stopped working.

Starting ipython3 and executing the following commands

%matplotlib
import numpy as np
import matplotlib.pyplot as plt
t = np.r_[0:5]
plt.plot(t, t)

now produces an empty, gray window. This was working fine in a
previous version using python3.3.




Information forwarded to bug-guix <at> gnu.org:
bug#20888; Package guix. (Wed, 24 Jun 2015 13:09:02 GMT) Full text and rfc822 format available.

Message #8 received at 20888 <at> debbugs.gnu.org (full text, mbox):

From: Federico Beffa <beffa <at> ieee.org>
To: 20888 <at> debbugs.gnu.org
Subject: matplotlib
Date: Wed, 24 Jun 2015 15:08:15 +0200
Maybe I should add, that, given that python-matplotlib didn't change
in any way, the problem is likely with one of the inputs.

Regards,
Fede




Information forwarded to bug-guix <at> gnu.org:
bug#20888; Package guix. (Wed, 01 Jul 2015 14:51:02 GMT) Full text and rfc822 format available.

Message #11 received at 20888 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
To: <20888 <at> debbugs.gnu.org>
Subject: matplotlib broken
Date: Wed, 1 Jul 2015 16:50:26 +0200
I'm afraid I cannot reproduce this.  This doesn't mean things just work
for me.  It rather means that I'm getting a different error:


$ GI_TYPELIB_PATH=$HOME/.guix-profile/lib/girepository-1.0/ PYTHONPATH=$HOME/.guix-profile/lib/python2.7/site-packages/ python
Python 2.7.6 (default, Jun 16 2015, 17:15:41) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> import matplotlib.pyplot as plt

(process:1384): Gtk-WARNING **: Locale not supported by C library.
	Using the fallback 'C' locale.
>>> t = np.r_[0:5]
>>> plt.plot(t, t)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/gnu/store/3qmjvhsyj5ccwx0d3lcmsirb9a78473v-python2-matplotlib-1.4.2/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/pyplot.py", line 3092, in plot
    ax = gca()
  File "/gnu/store/3qmjvhsyj5ccwx0d3lcmsirb9a78473v-python2-matplotlib-1.4.2/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/pyplot.py", line 828, in gca
    ax =  gcf().gca(**kwargs)
  File "/gnu/store/3qmjvhsyj5ccwx0d3lcmsirb9a78473v-python2-matplotlib-1.4.2/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/pyplot.py", line 462, in gcf
    return figure()
  File "/gnu/store/3qmjvhsyj5ccwx0d3lcmsirb9a78473v-python2-matplotlib-1.4.2/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/pyplot.py", line 435, in figure
    **kwargs)
  File "/gnu/store/3qmjvhsyj5ccwx0d3lcmsirb9a78473v-python2-matplotlib-1.4.2/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/backends/backend_gtk3agg.py", line 110, in new_figure_manager
    return new_figure_manager_given_figure(num, thisFig)
  File "/gnu/store/3qmjvhsyj5ccwx0d3lcmsirb9a78473v-python2-matplotlib-1.4.2/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/backends/backend_gtk3agg.py", line 117, in new_figure_manager_given_figure
    canvas = FigureCanvasGTK3Agg(figure)
  File "/gnu/store/3qmjvhsyj5ccwx0d3lcmsirb9a78473v-python2-matplotlib-1.4.2/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/backends/backend_gtk3agg.py", line 25, in __init__
    backend_gtk3.FigureCanvasGTK3.__init__(self, figure)
  File "/gnu/store/3qmjvhsyj5ccwx0d3lcmsirb9a78473v-python2-matplotlib-1.4.2/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/backends/backend_gtk3.py", line 210, in __init__
    self._idle_event_id = GLib.idle_add(self.idle_event)
  File "/home/rwurmus/.guix-profile/lib/python2.7/site-packages/gi/types.py", line 44, in function
    return info.invoke(*args)
TypeError: Error invoking GLib.idle_add: Unexpected value for argument 'function'
>>> 


I don't know what this means.

On the other hand I get along without any errors if I set the backend to
'Agg' before importing pyplot:

>>> import numpy as np
>>> import matplotlib
>>> matplotlib.use('Agg')
>>> import matplotlib.pyplot as plt
>>> t = np.r_[0:5]
>>> plt.plot(t, t)
[<matplotlib.lines.Line2D object at 0x1e2a950>]
>>> ^C

I understand that this could then be used to write the plot to a file.
Do we actually need to use the Gtk+ backend by default?

~~ Ricardo




Information forwarded to bug-guix <at> gnu.org:
bug#20888; Package guix. (Wed, 01 Jul 2015 17:30:04 GMT) Full text and rfc822 format available.

Message #14 received at 20888 <at> debbugs.gnu.org (full text, mbox):

From: Federico Beffa <beffa <at> ieee.org>
To: 20888 <at> debbugs.gnu.org
Subject: Fwd: matplotlib
Date: Wed, 1 Jul 2015 19:29:32 +0200
To make it work I had to (with the old version) set

export GI_TYPELIB_PATH="$HOME/.guix-profile/lib/girepository-1.0"

As far as I know, 'Agg' can only be used to generate files. It can't
be used interactively a la MATLAB. That's the reason for including the
'GTK3Agg' backend.

Regards,
Fede




Information forwarded to bug-guix <at> gnu.org:
bug#20888; Package guix. (Wed, 01 Jul 2015 21:27:02 GMT) Full text and rfc822 format available.

Message #17 received at 20888 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de>
Cc: 20888 <at> debbugs.gnu.org
Subject: Re: bug#20888: matplotlib broken
Date: Wed, 01 Jul 2015 23:26:28 +0200
Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de> skribis:

> I'm afraid I cannot reproduce this.  This doesn't mean things just work
> for me.  It rather means that I'm getting a different error:

:-)

Could you try with ‘guix environment’ as noted at
<http://lists.gnu.org/archive/html/guix-devel/2015-06/msg00300.html>?

Ludo’.




bug closed, send any further explanations to 20888 <at> debbugs.gnu.org and Federico Beffa <beffa <at> ieee.org> Request was from Federico Beffa <beffa <at> ieee.org> to control <at> debbugs.gnu.org. (Sun, 26 Feb 2017 15:40:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 27 Mar 2017 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 30 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.