Can´t Save Matplotlib Figure To .eps In Windows While Using Text.usetex : True
When I run the following code: http://dpaste.com/0210P09 everything works fine on my Linux distro. However, in Windows7 (64bit) I cannot successfully save it in eps or svg. This is
Solution 1:
There are two problems here. The first and minor one is that in
C:\Users\12151056\AppData\Local\Continuum\Anaconda3\lib\site-package\matplotlib\backends\backend_ps.py", line 1556
you should change
fh.read()
to
fh.read().decode()
This is a Python 2/3 bug, that occurs while handling the fact that something with Ghostscript went wrong.
The main problem is that matplotlib cannot find Ghostscript because it is not in the path environmental variable. You can check that by opening a command prompt and trying the command gswin32c
or gs
. If these commands are not found you have to add the path of these Ghostscript executables to the path environmental variable. In my case it was:
C:\Program Files (x86)\gs\gs8.54\bin
but it depends on your installation path.
Post a Comment for "Can´t Save Matplotlib Figure To .eps In Windows While Using Text.usetex : True"