Hi All,
I'm trying to make a simple errorbar plot which gets saved to an EPS file. I
paste the code below. For some weird reason, the savefig line causes a
segmentation fault in ghostscript. when I use (in this case, on my computer)
206 points or more. It doesn't happen if I comment the "pl.rc('text',
usetex=True)" line out nor does it happen if I comment the pl.savefig line
out. This happens in matplotlib 0.99 and 0.98.5.2. Any help will be greatly
appreciated.
Regards,
Ewald Zietsman
#test.py
import matplotlib.pyplot as pl
import numpy as np
pl.rc('text', usetex=True)
pl.rc('font', family='serif')
N = 206
x1 = np.linspace(-10,10,N)
e1 = np.random.randn(N)
pl.errorbar(x1, x1, yerr=e1, fmt='k.')
pl.savefig('test.eps')
pl.show()
The error message:
python test.py
Segmentation fault
Traceback (most recent call last):
File "test.py", line 16, in <module>
pl.savefig('test.eps')
File "/usr/lib/python2.5/site-packages/matplotlib/pyplot.py", line 345, in
savefig
return fig.savefig(*args, **kwargs)
File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 990, in
savefig
self.canvas.print_figure(*args, **kwargs)
File "/usr/lib/python2.5/site-packages/matplotlib/backend_bases.py", line
1419, in print_figure
**kwargs)
File "/usr/lib/python2.5/site-packages/matplotlib/backend_bases.py", line
1308, in print_eps
return ps.print_eps(*args, **kwargs)
File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py",
line 869, in print_eps
return self._print_ps(outfile, 'eps', *args, **kwargs)
File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py",
line 892, in _print_ps
orientation, isLandscape, papertype)
File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py",
line 1148, in _print_figure_tex
else: gs_distill(tmpfile, isEPSF, ptype=papertype, bbox=bbox)
File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py",
line 1268, in gs_distill
your image.\nHere is the full report generated by ghostscript:\n\n' +
fh.read())
RuntimeError: ghostscript was not able to process your image.
Here is the full report generated by ghostscript:
GPL Ghostscript 8.63 (2008-08-01)
Copyright (C) 2008 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading CenturySchL-Roma font from
/var/lib/defoma/gs.d/dirs/fonts/c059013l.pfb... 3423696 1832182 6023256
4166010 1 done.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users