Re: [Matplotlib-users] Problem generating postscript

2009-12-31 Thread Jouni K . Seppänen
Eric Emsellem eemse...@eso.org writes:

 regarding my last post, I still have pb generating simple eps files.

Can you be more specific about the last post you are referring to? I
searched using Gmane and didn't find anything recent:

http://search.gmane.org/?author=eric+emsellemgroup=gmane.comp.python.matplotlib.generalsort=date

 thanks a lot for the quick tip. But no xpdf does not do it (I had
 tried it).

What exact error message do you get in that case?

 ps.usedistiller   : None
 ## I tried all possible distiller... didn't change the pb.

Certainly the error message must have changed between runs, since your
first post showed a Ghostscript-specific message.

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Problem generating postscript

2009-12-30 Thread Eric Emsellem
Hi again

regarding my last post, I still have pb generating simple eps files.
Now I turned on usetex to True and I get the message given below. If
anyone can help me with this, it would be great since I am now stuck
with this.

Reminder: the pb occurs when I save a figure (savefig) in postscript
format (.eps), after plotting a number of small thumbnail images (using
pcolormesh and contour).

cheers

Eric
===
GPL Ghostscript 8.64: Unrecoverable error, exit code 1
---
RuntimeError  Traceback (most recent call last)

/home/science/ATLAS3D/python/Analysis/show_maps.py in module()
 1
  2
  3
  4
  5

/usr/lib64/python2.6/site-packages/matplotlib/pyplot.pyc in
savefig(*args, **kwargs)
354 def savefig(*args, **kwargs):

355 fig = gcf()

-- 356 return fig.savefig(*args, **kwargs)

357 if Figure.savefig.__doc__ is not None:

358 savefig.__doc__ = dedent(Figure.savefig.__doc__)


/usr/lib64/python2.6/site-packages/matplotlib/figure.pyc in
savefig(self, *args, **kwargs)
   1030 patch.set_alpha(0.0)

   1031

- 1032 self.canvas.print_figure(*args, **kwargs)

   1033

   1034 if transparent:


/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_wxagg.pyc
in print_figure(self, filename, *args, **kwargs)
 98 def print_figure(self, filename, *args, **kwargs):

 99 # Use pure Agg renderer to draw


-- 100 FigureCanvasAgg.print_figure(self, filename, *args,
**kwargs)
101 # Restore the current view; this is needed because the


102 # artist contains methods rely on particular attributes


/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyc in
print_figure(self, filename, dpi, facecolor, edgecolor, orientation,
format, **kwargs)
   1474 orientation=orientation,


   1475 bbox_inches_restore=_bbox_inches_restore,


- 1476 **kwargs)


   1477 finally:


   1478 if bbox_inches and restore_bbox:



/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyc in
print_eps(self, *args, **kwargs)
   1327 from backends.backend_ps import FigureCanvasPS # lazy
import
   1328 ps = self.switch_backends(FigureCanvasPS)

- 1329 return ps.print_eps(*args, **kwargs)

   1330

   1331 def print_pdf(self, *args, **kwargs):


/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_ps.pyc in
print_eps(self, outfile, *args, **kwargs)
853

854 def print_eps(self, outfile, *args, **kwargs):

-- 855 return self._print_ps(outfile, 'eps', *args, **kwargs)

856

857


/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_ps.pyc in
_print_ps(self, outfile, format, *args, **kwargs)
882 self._print_figure_tex(outfile, format, imagedpi,
facecolor, edgecolor,
883orientation, isLandscape,
papertype,
-- 884**kwargs)

885 else:


886 self._print_figure(outfile, format, imagedpi,
facecolor, edgecolor,


/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_ps.pyc in
_print_figure_tex(self, outfile, format, dpi, facecolor, edgecolor,
orientation, isLandscape, papertype, **kwargs)



   1191 elif rcParams['text.usetex']:


   1192 if False: pass # for debugging


- 1193 else: gs_distill(tmpfile, isEPSF, ptype=papertype,
bbox=bbox)

   1194


   1195 if  isinstance(outfile, file):



/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_ps.pyc in
gs_distill(tmpfile, eps, ptype, bbox)
   1311 fh = file(outfile)

   1312 if exit_status: raise RuntimeError('ghostscript was not able
to process \
- 1313 your image.\nHere is the full report generated by
ghostscript:\n\n' + fh.read())
   1314 else: verbose.report(fh.read(), 'debug')


   1315 fh.close()



RuntimeError: ghostscript was not able to process your image.
Here is the full report generated by ghostscript:

GPL Ghostscript 8.64 (2009-02-03)
Copyright (C) 2009 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file COPYING for details.
Loading NimbusSanL-Regu font from
/usr/share/ghostscript/8.64/Resource/Font/NimbusSanL-Regu... 3968216
1927802 6785440 4864692 1 done.
Loading CenturySchL-Roma font from
/usr/share/ghostscript/8.64/Resource/Font/CenturySchL-Roma... 4008424
2092670 6785440 4877110 1 done.
Error: /limitcheck in --def--
Operand stack:
   p1c_37d   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--
--nostringval--   2   %stopped_push   --nostringval--   --nostringval--
  --nostringval--   false   1   %stopped_push   1878   1   3
%oparray_pop   1877   1   3   

Re: [Matplotlib-users] Problem generating postscript

2009-12-30 Thread Jae-Joon Lee
This is a kind of bug that is quite hard to trace unless we can
reproduce the error.

As far as I know, there has been a report that matplotlib does not
work well with GPL Ghostscript 8.63. And I'm not sure if it is
related.

http://old.nabble.com/Segmentation-fault-with-EPS-output-on-matplotlib-%3D0.98.5.2-to25257581.html#a25334270

So, see if using xpdf as a distiller works.

Regards,

-JJ

On Wed, Dec 30, 2009 at 9:39 AM, Eric Emsellem eemse...@eso.org wrote:
 Hi again

 regarding my last post, I still have pb generating simple eps files.
 Now I turned on usetex to True and I get the message given below. If
 anyone can help me with this, it would be great since I am now stuck
 with this.

 Reminder: the pb occurs when I save a figure (savefig) in postscript
 format (.eps), after plotting a number of small thumbnail images (using
 pcolormesh and contour).

 cheers

 Eric
 ===
 GPL Ghostscript 8.64: Unrecoverable error, exit code 1
 ---
 RuntimeError                              Traceback (most recent call last)

 /home/science/ATLAS3D/python/Analysis/show_maps.py in module()
  1
      2
      3
      4
      5

 /usr/lib64/python2.6/site-packages/matplotlib/pyplot.pyc in
 savefig(*args, **kwargs)
    354 def savefig(*args, **kwargs):

    355     fig = gcf()

 -- 356     return fig.savefig(*args, **kwargs)

    357 if Figure.savefig.__doc__ is not None:

    358     savefig.__doc__ = dedent(Figure.savefig.__doc__)


 /usr/lib64/python2.6/site-packages/matplotlib/figure.pyc in
 savefig(self, *args, **kwargs)
   1030                 patch.set_alpha(0.0)

   1031

 - 1032         self.canvas.print_figure(*args, **kwargs)

   1033

   1034         if transparent:


 /usr/lib64/python2.6/site-packages/matplotlib/backends/backend_wxagg.pyc
 in print_figure(self, filename, *args, **kwargs)
     98     def print_figure(self, filename, *args, **kwargs):

     99         # Use pure Agg renderer to draw


 -- 100         FigureCanvasAgg.print_figure(self, filename, *args,
 **kwargs)
    101         # Restore the current view; this is needed because the


    102         # artist contains methods rely on particular attributes


 /usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyc in
 print_figure(self, filename, dpi, facecolor, edgecolor, orientation,
 format, **kwargs)
   1474                 orientation=orientation,


   1475                 bbox_inches_restore=_bbox_inches_restore,


 - 1476                 **kwargs)


   1477         finally:


   1478             if bbox_inches and restore_bbox:



 /usr/lib64/python2.6/site-packages/matplotlib/backend_bases.pyc in
 print_eps(self, *args, **kwargs)
   1327         from backends.backend_ps import FigureCanvasPS # lazy
 import
   1328         ps = self.switch_backends(FigureCanvasPS)

 - 1329         return ps.print_eps(*args, **kwargs)

   1330

   1331     def print_pdf(self, *args, **kwargs):


 /usr/lib64/python2.6/site-packages/matplotlib/backends/backend_ps.pyc in
 print_eps(self, outfile, *args, **kwargs)
    853

    854     def print_eps(self, outfile, *args, **kwargs):

 -- 855         return self._print_ps(outfile, 'eps', *args, **kwargs)

    856

    857


 /usr/lib64/python2.6/site-packages/matplotlib/backends/backend_ps.pyc in
 _print_ps(self, outfile, format, *args, **kwargs)
    882             self._print_figure_tex(outfile, format, imagedpi,
 facecolor, edgecolor,
    883                                    orientation, isLandscape,
 papertype,
 -- 884                                    **kwargs)

    885         else:


    886             self._print_figure(outfile, format, imagedpi,
 facecolor, edgecolor,


 /usr/lib64/python2.6/site-packages/matplotlib/backends/backend_ps.pyc in
 _print_figure_tex(self, outfile, format, dpi, facecolor, edgecolor,
 orientation, isLandscape, papertype, **kwargs)



   1191         elif rcParams['text.usetex']:


   1192             if False: pass # for debugging


 - 1193             else: gs_distill(tmpfile, isEPSF, ptype=papertype,
 bbox=bbox)

   1194


   1195         if  isinstance(outfile, file):



 /usr/lib64/python2.6/site-packages/matplotlib/backends/backend_ps.pyc in
 gs_distill(tmpfile, eps, ptype, bbox)
   1311     fh = file(outfile)

   1312     if exit_status: raise RuntimeError('ghostscript was not able
 to process \
 - 1313 your image.\nHere is the full report generated by
 ghostscript:\n\n' + fh.read())
   1314     else: verbose.report(fh.read(), 'debug')


   1315     fh.close()



 RuntimeError: ghostscript was not able to process your image.
 Here is the full report generated by ghostscript:

 GPL Ghostscript 8.64 (2009-02-03)
 Copyright (C) 2009 Artifex Software, Inc.  All rights reserved.
 This software comes with NO WARRANTY: see the file COPYING for details.
 Loading NimbusSanL-Regu font from
 

Re: [Matplotlib-users] Problem generating postscript

2009-12-30 Thread Eric Emsellem
Hi
thanks a lot for the quick tip. But no xpdf does not do it (I had tried it).

Just to be consistent below is an account of my config (may not help
much). I'll tried to write some simple script to reproduce the bug and
post it but I am afraid this won't be very simple on my side.

cheers
Eric
==
# OS is OpenSuse 11.2 with KDE, 64b laptop

matplotlib version 0.99.1.1
verbose.level helpful
interactive is False
units is False
platform is linux2
backend WXAgg version 2.8.10.1
Python 2.6.2 (r262:71600, Oct 24 2009, 03:15:21)
IPython 0.10 -- An enhanced Interactive Python.

# And in my matplotlibrc:
usetex False
## tried usetex True too
ps.papersize  : A4
ps.useafm : False
ps.usedistiller   : None
## I tried all possible distiller... didn't change the pb.
ps.distiller.res  : 120  # dpi
ps.fonttype   : 3
==

On 30/12/09 20:35, Jae-Joon Lee wrote:
 This is a kind of bug that is quite hard to trace unless we can
 reproduce the error.
 
 As far as I know, there has been a report that matplotlib does not
 work well with GPL Ghostscript 8.63. And I'm not sure if it is
 related.
 
 http://old.nabble.com/Segmentation-fault-with-EPS-output-on-matplotlib-%3D0.98.5.2-to25257581.html#a25334270
 
 So, see if using xpdf as a distiller works.


-- 
=
Eric Emsellem   European Southern Observatory
Karl-Schwarzschild Str. 2
e-mail: eemse...@eso.org  85748 Garching bei Muenchen
tel: +49 (0)89 3200 6914  Germany
fax: +49 (0)89 3200 6480
=

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users