[IPython-user] matplotlib savefig() backends
izak marais
izakmarais@yahoo....
Wed Jun 25 10:07:41 CDT 2008
Hi
After starting "ipython -pylab", the code at the bottom generates an error.
Is this a known bug or is there something fishy with my installation?
savefig(<*.pdf>) works fine when called from a script outside Ipython, so
the problem must be something with Ipython or its configuration.
My setup: Windows XP, Ipython version 0.8.4, matplotlib version 0.91.2, python 2.4.3
Regards
Izak
CODE:
plot([1 ,2 3])
savefig("test.pdf")
ERROR:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
C:\Python24\lib\site-packages\matplotlib\pyplot.pyc in savefig(*args, **kwargs)
267 def savefig(*args, **kwargs):
268 fig = gcf()
--> 269 return fig.savefig(*args, **kwargs)
270 if Figure.savefig.__doc__ is not None:
271 savefig.__doc__ = dedent(Figure.savefig.__doc__)
C:\Python24\lib\site-packages\matplotlib\figure.pyc in savefig(self, *args, **kwargs)
780 kwargs[key] = rcParams['savefig.%s'%key]
781
--> 782 self.canvas.print_figure(*args, **kwargs)
783
784 def colorbar(self, mappable, cax=None, ax=None, **kw):
C:\Python24\lib\site-packages\matplotlib\backend_bases.pyc in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, *
*kwargs)
1192 facecolor=facecolor,
1193 edgecolor=edgecolor,
-> 1194 orientation=orientation,
1195 **kwargs)
1196 finally:
C:\Python24\lib\site-packages\matplotlib\backend_bases.pyc in print_pdf(self, *args, **kwargs)
1100
1101 def print_pdf(self, *args, **kwargs):
-> 1102 from backends.backend_pdf import FigureCanvasPdf # lazy import
1103 pdf = self.switch_backends(FigureCanvasPdf)
1104 return pdf.print_pdf(*args, **kwargs)
C:\Python24\Lib\site-packages\matplotlib\backends\backend_pdf.py
11 import time
12 import warnings
---> 13 import zlib
14
15 import numpy as npy
ImportError: dynamic module does not define init function (initzlib)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ipython.scipy.org/pipermail/ipython-user/attachments/20080625/96eb5f31/attachment.html
More information about the IPython-user
mailing list