all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
To: 20888@debbugs.gnu.org
Subject: bug#20888: matplotlib broken
Date: Wed, 1 Jul 2015 16:50:26 +0200	[thread overview]
Message-ID: <idj1tgshqz1.fsf@bimsb-sys02.mdc-berlin.net> (raw)
In-Reply-To: <CAKrPhPP2MzW36yzYcv3X0hatcXSzuSkzA_skEYcQh-sais5HWQ@mail.gmail.com>

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

  parent reply	other threads:[~2015-07-01 14:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-24  6:59 bug#20888: matplotlib broken Federico Beffa
2015-06-24 13:08 ` bug#20888: matplotlib Federico Beffa
2015-07-01 17:29   ` bug#20888: Fwd: matplotlib Federico Beffa
2015-07-01 14:50 ` Ricardo Wurmus [this message]
2015-07-01 21:26   ` bug#20888: matplotlib broken Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=idj1tgshqz1.fsf@bimsb-sys02.mdc-berlin.net \
    --to=ricardo.wurmus@mdc-berlin.de \
    --cc=20888@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.