Bug in eps output of matplotlib

I'm running v0.99.1.2 on Debian Linux, 32 bit Intel. A colorbar on
the right with negative labels produces postscript-eps output which
displays ok with gv or evince. But when conversion of the ps/eps file
to pdf is made, the negative labels get replaced by dashes when the
pdf is viewed by xpdf or evince. A variety of pdf conversion methods
(ps2pdf, pdflatex) were used, all with the same result. I am
including a simple sample python script which creates a graphic with
the problem:

···

---------------------------------------------------------------------

#!/usr/bin/python
from numpy import *
import matplotlib.pyplot as plt

# this demos a bug in the eps output

x = linspace(0,6,13)
y = linspace(0,3,7)
(X,Y) = meshgrid(x,y)
a = 3.5*sin(X)*sin(Y)

c = plt.contourf(x,y,a)
b = plt.colorbar(c, orientation = 'vertical')
lx = plt.xlabel('x')
ly = plt.ylabel('y')
ax = plt.axis([0,6,0,3])

plt.show()

---------------------------------------------------------------------

Xpdf outputs the following error messages:
Error: Bad bounding box in Type 3 glyph
Error: Missing or bad Type3 CharProc entry
Error: Bad bounding box in Type 3 glyph
Error: Missing or bad Type3 CharProc entry
Error: Bad bounding box in Type 3 glyph
Error: Missing or bad Type3 CharProc entry
Error: Bad bounding box in Type 3 glyph
Error: Missing or bad Type3 CharProc entry
Error: Bad bounding box in Type 3 glyph
Error: Missing or bad Type3 CharProc entry
Error: Bad bounding box in Type 3 glyph
Error: Missing or bad Type3 CharProc entry
Error: Bad bounding box in Type 3 glyph
Error: Missing or bad Type3 CharProc entry
Error: Bad bounding box in Type 3 glyph
Error: Missing or bad Type3 CharProc entry

These don't appear if there are no negative numbers in the
colorbar scale.

Dave Raymond

PS -- I haven't filed a bug report because I haven't been able
to figure out the Source Forge bug reporting system yet.

I can't seem to reproduce this on a 32-bit RHEL4 machine with:

python-2.5.4
matplotlib-0.99.1.2
GNU ghostscript 7.07

and viewed with any of:

Adobe Reader 8.1.7
xpdf 3.00
ggv 2.8.0
(sorry no evince on RHEL4)

What versions of these tools are you running? Do you have any customizations in your matplotlibrc file? Can you send me (off-list) the ps/eps and pdf files in question?

Mike

David J. Raymond wrote:

···

I'm running v0.99.1.2 on Debian Linux, 32 bit Intel. A colorbar on
the right with negative labels produces postscript-eps output which
displays ok with gv or evince. But when conversion of the ps/eps file
to pdf is made, the negative labels get replaced by dashes when the
pdf is viewed by xpdf or evince. A variety of pdf conversion methods
(ps2pdf, pdflatex) were used, all with the same result. I am
including a simple sample python script which creates a graphic with
the problem:

---------------------------------------------------------------------

#!/usr/bin/python
from numpy import *
import matplotlib.pyplot as plt

# this demos a bug in the eps output

x = linspace(0,6,13)
y = linspace(0,3,7)
(X,Y) = meshgrid(x,y)
a = 3.5*sin(X)*sin(Y)

c = plt.contourf(x,y,a)
b = plt.colorbar(c, orientation = 'vertical')
lx = plt.xlabel('x')
ly = plt.ylabel('y')
ax = plt.axis([0,6,0,3])

plt.show()

---------------------------------------------------------------------

Xpdf outputs the following error messages:
Error: Bad bounding box in Type 3 glyph
Error: Missing or bad Type3 CharProc entry
Error: Bad bounding box in Type 3 glyph
Error: Missing or bad Type3 CharProc entry
Error: Bad bounding box in Type 3 glyph
Error: Missing or bad Type3 CharProc entry
Error: Bad bounding box in Type 3 glyph
Error: Missing or bad Type3 CharProc entry
Error: Bad bounding box in Type 3 glyph
Error: Missing or bad Type3 CharProc entry
Error: Bad bounding box in Type 3 glyph
Error: Missing or bad Type3 CharProc entry
Error: Bad bounding box in Type 3 glyph
Error: Missing or bad Type3 CharProc entry
Error: Bad bounding box in Type 3 glyph
Error: Missing or bad Type3 CharProc entry

These don't appear if there are no negative numbers in the
colorbar scale.

Dave Raymond

PS -- I haven't filed a bug report because I haven't been able
to figure out the Source Forge bug reporting system yet.

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
  
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA