EPS backend

I'm having problems recently with printing EPS figures created by
matplotlib. To me this is strange because printing postscript should
just work in my opinion.

My most recent example is a Basemap thing with AxesGrid. Basically the
idea was to have six maps nicely arranged on a DIN A4 paper for
printout. The EPS looked nice on my notebook but printing them on our
freshly leased printers at the institute failed in the middle of the
fifth map (six maps in total). I have Ghostscript 9.07 and it turned out
that this EPS stopped working with just one earlier version (a college
with Ghostscript 9.06 could not open the EPS or more correct Ghostview
failed in the middle of map number five).

I expect such a Ghostscript version thing to be the problem also with
the printer. If that is the case don't you think that's ridiculous?
Isn't at least some legacy support wanted?

I don't have a minimal example yet, but I could try to create one next
week if the need is there. The above mentioned thing was something
along the lines of:

...
import matplotlib.pyplot as pl
from mpl_toolkits.basemap import Basemap
from mpl_toolkits.axes_grid1 import AxesGrid

# loading data
...

fig = pl.figure(1, (16,19))
grid = AxesGrid(fig, 111,
            nrows_ncols = (3, 2),
            axes_pad = 0.3,
            cbar_location = 'top',
            cbar_mode = 'each',
            cbar_size = '3%',
            cbar_pad = '1%',
           )
for i in range(6):
    bmap = Basemap(projection='aeqd', ..., ax=grid[i])
    ...

pl.savefig('sixer.eps', bbox_inches='tight')

Best regards, Yoshi

I'm having problems recently with printing EPS figures created by
matplotlib. To me this is strange because printing postscript should
just work in my opinion.

My most recent example is a Basemap thing with AxesGrid. Basically the
idea was to have six maps nicely arranged on a DIN A4 paper for
printout. The EPS looked nice on my notebook but printing them on our
freshly leased printers at the institute failed in the middle of the
fifth map (six maps in total). I have Ghostscript 9.07 and it turned out
that this EPS stopped working with just one earlier version (a college
with Ghostscript 9.06 could not open the EPS or more correct Ghostview
failed in the middle of map number five).

I expect such a Ghostscript version thing to be the problem also with
the printer. If that is the case don't you think that's ridiculous?
Isn't at least some legacy support wanted?

Yes -- legacy support is of course intended... matplotlib has been going for over 10 years, after all, and we're very conservative about intentionally breaking legacy systems.

Have you tried setting ps.usedistiller to False, or xpdf? There have been problems using Ghostscript as a distiller with recent versions of Ghostscript.

We'll need a minimal example, or at least a copy of the PS file to investigate this further, however. Also, what platform, version of matplotlib and Python are you using?

Mike

···

On 06/07/2013 05:07 AM, Yoshi Rokuko wrote:

I don't have a minimal example yet, but I could try to create one next
week if the need is there. The above mentioned thing was something
along the lines of:

...
import matplotlib.pyplot as pl
from mpl_toolkits.basemap import Basemap
from mpl_toolkits.axes_grid1 import AxesGrid

# loading data
...

fig = pl.figure(1, (16,19))
grid = AxesGrid(fig, 111,
             nrows_ncols = (3, 2),
             axes_pad = 0.3,
             cbar_location = 'top',
             cbar_mode = 'each',
             cbar_size = '3%',
             cbar_pad = '1%',
            )
for i in range(6):
     bmap = Basemap(projection='aeqd', ..., ax=grid[i])
     ...

pl.savefig('sixer.eps', bbox_inches='tight')

Best regards, Yoshi

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Fr, 7 Jun 2013 10:13:26 -0400 Michael Droettboom <mdroe@...86...>:

Have you tried setting ps.usedistiller to False, or xpdf? There have
been problems using Ghostscript as a distiller with recent versions
of Ghostscript.

No, I didn't try. Thanks for the hint, I will test that.

We'll need a minimal example, or at least a copy of the PS file to
investigate this further, however. Also, what platform, version of
matplotlib and Python are you using?

If I keep everything on my system linux with python 2.7.5 and
matplotlib 1.2.1 it works fine. Problems arise if I move the EPS to an
older system or the printing. I will have access to these machines on
Tue. I will try to create a minimal example then.

Best regards, Yoshi

OK, I created a more simple example that fails. It is attached as
draw.py and the output produced by the printer is attached as a scan.
Using ps.distiller == False doesn't change the output but setting it to
'xpdf' does. The latter is also printable. Everything including the EPS
outputs is compressed in [1]. This archive includes also a file
test-opt.eps that was generated with eps2eps from the original EPS
without any ps.usedistiller options. This optimized EPS by eps2eps can
be printed too. Although sometimes bboxes get destroyed by this.

Do you need further information in order to investigate this issue?

Thank you and best regards,
Yoshi Rokuko

[1] http://rokuko.net/matplotlib-eps.tar.bz2 (23M)

draw.py (1.17 KB)

draw-false.py (1.21 KB)

draw-xpdf.py (1.21 KB)

lonlat (38.4 KB)

Scanned from a Xerox multifunction device.pdf (95.7 KB)

···

Am Fri, 7 Jun 2013 22:15:31 +0200 schrieb Yoshi Rokuko <yoshi@...3676...>:

Fr, 7 Jun 2013 10:13:26 -0400 Michael Droettboom <mdroe@...86...>:

> Have you tried setting ps.usedistiller to False, or xpdf? There
> have been problems using Ghostscript as a distiller with recent
> versions of Ghostscript.

No, I didn't try. Thanks for the hint, I will test that.

> We'll need a minimal example, or at least a copy of the PS file to
> investigate this further, however. Also, what platform, version of
> matplotlib and Python are you using?

If I keep everything on my system linux with python 2.7.5 and
matplotlib 1.2.1 it works fine. Problems arise if I move the EPS to
an older system or the printing. I will have access to these
machines on Tue. I will try to create a minimal example then.