Problem with matplotlib backend

Fabien Lafont <[email protected]>
Newsgroups gmane.comp.graphics.ipe.general
Message-ID <CAC9H_chgnP9SB1eKARxfVRiJgiojxtrBa2aBUKWmAaZFCqNPaA@mail.gmail.com>
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

_______________________________________________
Ipe-discuss mailing list
Ipe-discuss-rGrgPyRx506NN8uzcEdRPYRWq/[email protected]
http://lists.science.uu.nl/mailman/listinfo/ipe-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.