[Python-modules-team] Bug#505527: python-matplotlib: PS and EPS backends fail

Borja Bergua Guerra borjilla at gmail.com
Thu Nov 13 10:46:10 UTC 2008


Package: python-matplotlib
Version: 0.98.1-1+lenny3
Severity: important

When I try to save a figure to a PS or EPS file, I get an error.
This is a very simple piece of code that generates the error:

#!/usr/bin/env python
"""
Example: simple line plot.
Show how to make and save a simple line plot with labels, title and grid
"""
import numpy
import pylab

t = numpy.arange(0.0, 1.0+0.01, 0.01)
s = numpy.cos(2*2*numpy.pi*t)
pylab.plot(t, s)

pylab.xlabel('time (s)')
pylab.ylabel('voltage (mV)')
pylab.title('About as simple as it gets, folks')
pylab.grid(True)
pylab.savefig('simple_plot.eps')

pylab.show()

When I execute the above program what I obtain is:

$ ./cos.py
Traceback (most recent call last):
File "./cos.py", line 17, in <module>
pylab.savefig('simple_plot.eps')
  File "/usr/lib/python2.5/site-packages/matplotlib/pyplot.py", line
286, in savefig
    return fig.savefig(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line
1014, in savefig
    self.canvas.print_figure(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/matplotlib/backend_bases.py",
line 1287, in print_figure
    **kwargs)
  File "/usr/lib/python2.5/site-packages/matplotlib/backend_bases.py",
line 1176, in print_eps
    return ps.print_eps(*args, **kwargs)
  File
"/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py",
line 843, in print_eps
    return self._print_ps(outfile, 'eps', *args, **kwargs)
  File
"/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py",
line 869, in _print_ps
    orientation, isLandscape, papertype)
  File
"/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py",
line 988, in _print_figure
    convert_ttf_to_ps(font_filename, fh, rcParams['ps.fonttype'],
glyph_ids)
RuntimeError: more keyword list entries than argument specifiers


Borja.

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686-bigmem (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-matplotlib depends on:
ii  dvipng                 1.11-1            convert DVI files to PNG graphics
ii  libatk1.0-0            1.22.0-1          The ATK accessibility toolkit
ii  libc6                  2.7-15            GNU C Library: Shared libraries
ii  libcairo2              1.6.4-6.1         The Cairo 2D vector graphics libra
ii  libfreetype6           2.3.7-2           FreeType 2 font engine, shared lib
ii  libgcc1                1:4.3.2-1         GCC support library
ii  libglib2.0-0           2.16.6-1          The GLib library of C routines
ii  libgtk2.0-0            2.12.11-4         The GTK+ graphical user interface
ii  libpango1.0-0          1.20.5-3          Layout and rendering of internatio
ii  libpng12-0             1.2.27-2          PNG library - runtime
ii  libstdc++6             4.3.2-1           The GNU Standard C++ Library v3
ii  python                 2.5.2-2           An interactive high-level object-o
ii  python-cairo           1.4.12-1.1        Python bindings for the Cairo vect
ii  python-central         0.6.8             register and build utility for Pyt
ii  python-configobj       4.5.2-1           a simple but powerful config file
ii  python-dateutil        1.4.1-2           powerful extensions to the standar
ii  python-dev             2.5.2-2           Header files and a static library
ii  python-enthought-trait 2.0.5-1           Manifest typing and reactive progr
ii  python-excelerator     0.6.3a-3.1        module for reading/writing Excel s
ii  python-gd              0.52debian-3.1    Python module wrapper for libgd
ii  python-glade2          2.12.1-6          GTK+ bindings: Glade support
ii  python-gobject         2.14.2-1          Python bindings for the GObject li
ii  python-gtk2            2.12.1-6          Python bindings for the GTK+ widge
ii  python-matplotlib-data 0.98.1-1+lenny3   Python based plotting system (data
ii  python-numpy           1:1.1.0-3         Numerical Python adds a fast array
ii  python-pyparsing       1.5.0-1           Python parsing module
ii  python-tk              2.5.2-1           Tkinter - Writing Tk applications
ii  python-tz              2008c-2           Python version of the Olson timezo
ii  tcl8.4                 8.4.19-2          Tcl (the Tool Command Language) v8
ii  tk8.4                  8.4.19-2          Tk toolkit for Tcl and X11, v8.4 -
ii  zlib1g                 1:1.2.3.3.dfsg-12 compression library - runtime

python-matplotlib recommends no packages.

Versions of packages python-matplotlib suggests:
pn  ipython                    <none>        (no description available)
pn  python-matplotlib-doc      <none>        (no description available)
ii  texlive-extra-utils        2007.dfsg.2-4 TeX Live: TeX auxiliary programs
ii  texlive-latex-extra        2007.dfsg.8-1 TeX Live: LaTeX supplementary pack

-- no debconf information





More information about the Python-modules-team mailing list