Re: [Matplotlib-users] Segmentation fault with EPS output on matplotlib =0.98.5.2

2009-09-07 Thread Ewald Zietsman
I'm using 'xpdf' now, I think it must be ghostscript acting up. I only need
eps output infrequently so I'll stick with this workaround for the moment.

On Mon, Sep 7, 2009 at 4:28 AM, Jae-Joon Lee lee.j.j...@gmail.com wrote:

 I cannot reproduce this error.
 And I'm not sure if this is a bug in matplotlib or ghostscript.
 You may try to use different distiller.

 pl.rc('ps', usedistiller=xpdf)

 In my machine, both ghostscript and xpdf option works fine.
 But my gs version is different than yours

 GPL Ghostscript 8.61 (2007-11-21)

 If the xpdf option woks, I think it is more likely that this is a bug in
 gs.

 Regards,

 -JJ


 On Wed, Sep 2, 2009 at 9:22 AM, Ewald Zietsmanewald.ziets...@gmail.com
 wrote:
  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
 
 

--
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


[Matplotlib-users] Segmentation fault with EPS output on matplotlib =0.98.5.2

2009-09-02 Thread Ewald Zietsman
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


[Matplotlib-users] Coordinates of contour lines

2009-04-09 Thread Ewald Zietsman
Hi All,

I need to use the coordinates of a contour line for further calculations. Is
there a simple way to get the x,y coordinates from a contour object or
otherwise?

i.e. I have (x,y,z) coordinates and have created a contour map from these. I
need the (x,y) coordinates of the contour line with value z0.

Cheers

Ewald
--
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] plotting problem

2007-02-14 Thread Ewald Zietsman

Hi All,

I have a slight problem using matplotlib 0.87.7.  I'm using Ubuntu 6.10 and
installed mpl from source. I'm running numpy 1.01, also installed from
source.

If I run the script below, the first plot shows fine. When I close it the
second plot should display but it doesn't. I can only get the first plot to
show. Thereafter the plot command doesn't seem to work. I tried reinstalling
matplotlib. That didn't work. This works fine if I type it into ipython. It
also works on my computer running FC5.

Any help will be greatly appreciated.

-Ewald

# Sample script
from pylab import *
t = arange(10)
f = t*t
plot(t,f)
show()
plot(t,f)
show()
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users