[Ipe-discuss] Problem with matplotlib backend
Fabien Lafont
lafont.fabien at gmail.com
Sat Dec 27 21:55:43 CET 2014
Dear everyone,
I've tried to use the matplotlib backend for ipe but it raise an error.
My backend_ipe.py is in C:\\python27 which is in my path as you can see
here:
>>> import sys
>>> print sys.path
['', 'C:\\Python27\\lib\\site-packages\\spyderlib\\utils\\external',
'C:\\Windows\\system32\\python27.zip', 'C:\\Python27\\DLLs',
'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win',
'C:\\Python27\\lib\\lib-tk', 'C:\\Python27',
'C:\\Python27\\lib\\site-packages',
'C:\\Python27\\lib\\site-packages\\win32',
'C:\\Python27\\lib\\site-packages\\win32\\lib',
'C:\\Python27\\lib\\site-packages\\Pythonwin',
'C:\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode']
The resulting error when I want to export the ipe file is:
C:\Python27\lib\site-packages\matplotlib\__init__.py:1155: UserWarning:
This call to matplotlib.use() has no effect
because the backend has already been chosen;
matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.
warnings.warn(_use_error_msg)
Traceback (most recent call last):
File "C:\Users\Fafou\Dropbox\Thèse\Manuscript\Python\LEP514\LEP514.py",
line 67, in <module>
plt.savefig("my_plot.ipe", format="ipe")
File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 561, in
savefig
return fig.savefig(*args, **kwargs)
File "C:\Python27\lib\site-packages\matplotlib\figure.py", line 1421, in
savefig
self.canvas.print_figure(*args, **kwargs)
File
"C:\Python27\lib\site-packages\matplotlib\backends\backend_qt4agg.py", line
167, in print_figure
FigureCanvasAgg.print_figure(self, *args, **kwargs)
File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", line
2129, in print_figure
print_method = self._get_print_method(format)
File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", line
2070, in _get_print_method
'%s.' % (format, ', '.join(formats)))
ValueError: Format "ipe" is not supported.
Supported formats: eps, jpeg, jpg, pdf, pgf, png, ps, raw, rgba, svg, svgz,
tif, tiff.
What's wrong??
Thanks,
Fabien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/ipe-discuss/attachments/20141227/8171cd9c/attachment.html
More information about the Ipe-discuss
mailing list