Latex problems...

Hi all,

with a current SVN checkout, I'm having serious latex problems (run
with debug-annoying):

In [5]: plot([1,2,3])
FigureCanvasAgg.draw
RendererAgg._get_agg_font
        findfont failed New Century Schoolbook
        findfont failed Century Schoolbook L
        findfont failed Utopia
        findfont failed ITC Bookman
        findfont failed Bookman
        findfont found Bitstream Vera Serif, normal, normal 500, normal, 12.0
findfont returning
/home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/mpl-data/VeraSe.ttf
Found dvipng version 1.8
latex -interaction=nonstopmode
-output-directory="/home/fperez/.matplotlib/tex.cache"
       "/home/fperez/.matplotlib/tex.cache/7ba2a6d994e57f6ad218b4d10097765e.tex"

"/home/fperez/.matplotlib/tex.cache/7ba2a6d994e57f6ad218b4d10097765e.output"

latex: unrecognized option
`-output-directory=/home/fperez/.matplotlib/tex.cache'
Try `latex --help' for more information.

···

---------------------------------------------------------------------------
exceptions.RuntimeError Traceback (most
recent call last)

/home/fperez/research/papers/nsform/scripts/<ipython console>

/home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/pylab.py
in plot(*args=([1, 2, 3],), **kwargs={})
   2021 except:
   2022 hold(b)
-> 2023 raise
   2024
   2025 hold(b)

[... snip ...]

/home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/text.py
in _get_layout(self=<matplotlib.text.TextWithDash instance>,
renderer=<matplotlib.backends.backend_agg.RendererAgg instance>)
    184 heightt += 3 # 3 pixel pad
    185 for line in lines:
--> 186 w,h = renderer.get_text_width_height(
        w = undefined
        h = undefined
        renderer.get_text_width_height = <bound method
RendererAgg.get_text_width_height of
<matplotlib.backends.backend_agg.RendererAgg instance at 0x4183ac4c>>
        line = '$0$'
        self._fontproperties = <matplotlib.font_manager.FontProperties
instance at 0x418402cc>
        global ismath = undefined
        self.is_math_text = <bound method TextWithDash.is_math_text of
<matplotlib.text.TextWithDash instance at 0x4184030c>>
    187 line, self._fontproperties, ismath=self.is_math_text())
    188

/home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/backends/backend_agg.py
in get_text_width_height(self=<matplotlib.backends.backend_agg.RendererAgg

, s='$0$', prop=<matplotlib.font_manager.FontProperties
, ismath='TeX', rgb=(0, 0, 0))

    237 size = prop.get_size_in_points()
    238 texmanager = self.get_texmanager()
--> 239 Z = texmanager.get_rgba(s, size, self.dpi.get(), rgb)
        Z = undefined
        texmanager.get_rgba = <bound method TexManager.get_rgba of
<matplotlib.texmanager.TexManager instance at 0x41bebd2c>>
        s = '$0$'
        size = 12.0
        self.dpi.get = <built-in method get of tuple object at 0x41736dcc>
        rgb = (0, 0, 0)
    240 m,n,tmp = Z.shape
    241 return n,m

/home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/texmanager.py
in get_rgba(self=<matplotlib.texmanager.TexManager instance>,
tex='$0$', fontsize=12.0, dpi=100.0, rgb=(0, 0, 0))
    333 if Z is None:
    334 # force=True to skip cacheing while debugging
--> 335 pngfile = self.make_png(tex, fontsize, dpi, force=False)
        pngfile = undefined
        self.make_png = <bound method TexManager.make_png of
<matplotlib.texmanager.TexManager instance at 0x41bebd2c>>
        tex = '$0$'
        fontsize = 12.0
        dpi = 100.0
        global force = undefined
        global False = undefined
    336 X = readpng(os.path.join(self.texcache, pngfile))
    337

/home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/texmanager.py
in make_png(self=<matplotlib.texmanager.TexManager instance>,
tex='$0$', fontsize=12.0, dpi=100.0, force=False)
    235 # see get_rgba for a discussion of the background
    236 if force or not os.path.exists(pngfile):
--> 237 dvifile = self.make_dvi(tex, fontsize)
        dvifile = undefined
        self.make_dvi = <bound method TexManager.make_dvi of
<matplotlib.texmanager.TexManager instance at 0x41bebd2c>>
        tex = '$0$'
        fontsize = 12.0
    238 outfile = basefile+'.output'
    239 command = 'dvipng -bg Transparent -D %s -T tight
-o "%s" "%s" \

/home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/texmanager.py
in make_dvi(self=<matplotlib.texmanager.TexManager instance>,
tex='$0$', fontsize=12.0, force=0)
    207 fh = file(outfile)
    208 if exit_status:
--> 209 raise RuntimeError('LaTeX was not able to
process the flowing \
        global RuntimeError = undefined
        tex = '$0$'
        fh.read = <built-in method read of file object at 0x418375a0>
    210 string:\n%s\nHere is the full report generated by LaTeX:
\n\n'% tex + fh.read())
    211 else: verbose.report(fh.read(), 'debug')

RuntimeError: LaTeX was not able to process the flowing string:
$0$
Here is the full report generated by LaTeX:

In [6]:

My matplotlibrc file has (this is what I think is relevant):

backend : TkAgg # the default backend
numerix : numpy # numpy, Numeric or numarray
text.usetex : True # use latex for all text handling. For
more information, see
                             #
http://www.scipy.org/Wiki/Cookbook/Matplotlib/UsingTex
text.dvipnghack : False # some versions of dvipng don't handle

This is running on a Fedora Core 3 box. Yes, I'll be upgrading to
Ubuntu very soon, but in the meantime it would be nice to be able to
use mpl :slight_smile:

My latex info:

planck[scripts]> latex --version
TeX (Web2C 7.4.5) 3.14159
kpathsea version 3.4.5
Copyright (C) 1997-2003 D.E. Knuth.

Cheers,

f

Hi Fernando,

Hi all,

with a current SVN checkout, I'm having serious latex problems (run
with debug-annoying):

I'm sorry for the trouble. I tried checking my recent changes on windows and
Linux, and didnt have any trouble, but I didnt try with an older version of
latex. It turns out that version 3.14159 does not support the --output-dir
option. Is updating your tetex an option? I'm using tetex-3.0:

latex --version
pdfeTeX 3.141592-1.30.5-2.2 (Web2C 7.5.5)
kpathsea version 3.5.5
Copyright 2005 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Kpathsea is copyright 2005 Karl Berry and Olaf Weber.
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfeTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfeTeX source.
Primary author of pdfeTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Kpathsea written by Karl Berry, Olaf Weber, and others.

···

On Friday 07 July 2006 17:56, Fernando Perez wrote:

In [5]: plot([1,2,3])
FigureCanvasAgg.draw
RendererAgg._get_agg_font
        findfont failed New Century Schoolbook
        findfont failed Century Schoolbook L
        findfont failed Utopia
        findfont failed ITC Bookman
        findfont failed Bookman
        findfont found Bitstream Vera Serif, normal, normal 500, normal,
12.0 findfont returning
/home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/mpl-data/Vera
Se.ttf Found dvipng version 1.8
latex -interaction=nonstopmode
-output-directory="/home/fperez/.matplotlib/tex.cache"
      
"/home/fperez/.matplotlib/tex.cache/7ba2a6d994e57f6ad218b4d10097765e.tex"

> "/home/fperez/.matplotlib/tex.cache/7ba2a6d994e57f6ad218b4d10097765e.outp
>ut"

latex: unrecognized option
`-output-directory=/home/fperez/.matplotlib/tex.cache'
Try `latex --help' for more information.
---------------------------------------------------------------------------
exceptions.RuntimeError Traceback (most
recent call last)

/home/fperez/research/papers/nsform/scripts/<ipython console>

/home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/pylab.py
in plot(*args=([1, 2, 3],), **kwargs={})
   2021 except:
   2022 hold(b)
-> 2023 raise
   2024
   2025 hold(b)

[... snip ...]

/home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/text.py
in _get_layout(self=<matplotlib.text.TextWithDash instance>,
renderer=<matplotlib.backends.backend_agg.RendererAgg instance>)
    184 heightt += 3 # 3 pixel pad
    185 for line in lines:
--> 186 w,h = renderer.get_text_width_height(
        w = undefined
        h = undefined
        renderer.get_text_width_height = <bound method
RendererAgg.get_text_width_height of
<matplotlib.backends.backend_agg.RendererAgg instance at 0x4183ac4c>>
        line = '$0$'
        self._fontproperties = <matplotlib.font_manager.FontProperties
instance at 0x418402cc>
        global ismath = undefined
        self.is_math_text = <bound method TextWithDash.is_math_text of
<matplotlib.text.TextWithDash instance at 0x4184030c>>
    187 line, self._fontproperties,
ismath=self.is_math_text()) 188

/home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/backends/back
end_agg.py in
get_text_width_height(self=<matplotlib.backends.backend_agg.RendererAgg
>, s='$0$', prop=<matplotlib.font_manager.FontProperties
>, ismath='TeX', rgb=(0, 0, 0))
    237 size = prop.get_size_in_points()
    238 texmanager = self.get_texmanager()
--> 239 Z = texmanager.get_rgba(s, size, self.dpi.get(), rgb)
        Z = undefined
        texmanager.get_rgba = <bound method TexManager.get_rgba of
<matplotlib.texmanager.TexManager instance at 0x41bebd2c>>
        s = '$0$'
        size = 12.0
        self.dpi.get = <built-in method get of tuple object at 0x41736dcc>
        rgb = (0, 0, 0)
    240 m,n,tmp = Z.shape
    241 return n,m

/home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/texmanager.py
in get_rgba(self=<matplotlib.texmanager.TexManager instance>,
tex='$0$', fontsize=12.0, dpi=100.0, rgb=(0, 0, 0))
    333 if Z is None:
    334 # force=True to skip cacheing while debugging
--> 335 pngfile = self.make_png(tex, fontsize, dpi,
force=False) pngfile = undefined
        self.make_png = <bound method TexManager.make_png of
<matplotlib.texmanager.TexManager instance at 0x41bebd2c>>
        tex = '$0$'
        fontsize = 12.0
        dpi = 100.0
        global force = undefined
        global False = undefined
    336 X = readpng(os.path.join(self.texcache, pngfile))
    337

/home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/texmanager.py
in make_png(self=<matplotlib.texmanager.TexManager instance>,
tex='$0$', fontsize=12.0, dpi=100.0, force=False)
    235 # see get_rgba for a discussion of the background
    236 if force or not os.path.exists(pngfile):
--> 237 dvifile = self.make_dvi(tex, fontsize)
        dvifile = undefined
        self.make_dvi = <bound method TexManager.make_dvi of
<matplotlib.texmanager.TexManager instance at 0x41bebd2c>>
        tex = '$0$'
        fontsize = 12.0
    238 outfile = basefile+'.output'
    239 command = 'dvipng -bg Transparent -D %s -T tight
-o "%s" "%s" \

/home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/texmanager.py
in make_dvi(self=<matplotlib.texmanager.TexManager instance>,
tex='$0$', fontsize=12.0, force=0)
    207 fh = file(outfile)
    208 if exit_status:
--> 209 raise RuntimeError('LaTeX was not able to
process the flowing \
        global RuntimeError = undefined
        tex = '$0$'
        fh.read = <built-in method read of file object at 0x418375a0>
    210 string:\n%s\nHere is the full report generated by LaTeX:
\n\n'% tex + fh.read())
    211 else: verbose.report(fh.read(), 'debug')

RuntimeError: LaTeX was not able to process the flowing string:
$0$
Here is the full report generated by LaTeX:

In [6]:

My matplotlibrc file has (this is what I think is relevant):

backend : TkAgg # the default backend
numerix : numpy # numpy, Numeric or numarray
text.usetex : True # use latex for all text handling. For
more information, see
                             #
http://www.scipy.org/Wiki/Cookbook/Matplotlib/UsingTex
text.dvipnghack : False # some versions of dvipng don't handle

This is running on a Fedora Core 3 box. Yes, I'll be upgrading to
Ubuntu very soon, but in the meantime it would be nice to be able to
use mpl :slight_smile:

My latex info:

planck[scripts]> latex --version
TeX (Web2C 7.4.5) 3.14159
kpathsea version 3.4.5
Copyright (C) 1997-2003 D.E. Knuth.

Cheers,

f

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Darren S. Dale, Ph.D.
Cornell High Energy Synchrotron Source
Cornell University
200L Wilson Lab
Rt. 366 & Pine Tree Road
Ithaca, NY 14853

dd55@...163...
office: (607) 255-9894
fax: (607) 255-9001

No, not really. I'm trying to finish some work to free up a day or
two so I can update all of our systems to Ubuntu Dapper, but that
means I can't really burn any time on patching pieces of the system.

But aside from my own troubles, I suspect that if you guys release
0.87.4 with this bug, I won't be the only one complaining :slight_smile: There
are probably other systems out there still not using tetex-3.0 (I
think Red Hat enterprise is fairly conservative in its upgrade policy,
and I don't know what Fedora 4 has, though Fedora 5 is likely OK).

Don't worry about me: I'll fix the mpl sources myself, that's easy
enough as a workaround. But you may want to take care of this before
the new release is out, which John mentioned this morning as coming
soon.

Cheers,

f

···

On 7/7/06, Darren Dale <dd55@...163...> wrote:

Hi Fernando,

On Friday 07 July 2006 17:56, Fernando Perez wrote:
> Hi all,
>
> with a current SVN checkout, I'm having serious latex problems (run
> with debug-annoying):

I'm sorry for the trouble. I tried checking my recent changes on windows and
Linux, and didnt have any trouble, but I didnt try with an older version of
latex. It turns out that version 3.14159 does not support the --output-dir
option. Is updating your tetex an option? I'm using tetex-3.0:

Don't worry about me: I'll fix the mpl sources myself, that's easy
enough as a workaround. But you may want to take care of this before
the new release is out, which John mentioned this morning as coming
soon.

I got it to work by changing in texmanager.py, line 203, from:

            command = 'latex -interaction=nonstopmode -output-directory="%s" \
                       "%s" > "%s"'%(self.texcache, texfile, outfile)

to:

            command = 'cd "%s" && latex -interaction=nonstopmode "%s"

"%s"' % \

                      (self.texcache,texfile, outfile)

This will work with any version of latex.

Cheers,

f

···

On 7/7/06, Fernando Perez <fperez.net@...287...> wrote:

But a similar change is also needed for EPS generation. I've just
attached a full patch, in case you want it.

Cheers,

f

mpl-tex.diff (1.46 KB)

···

On 7/7/06, Fernando Perez <fperez.net@...287...> wrote:

On 7/7/06, Fernando Perez <fperez.net@...287...> wrote:

> Don't worry about me: I'll fix the mpl sources myself, that's easy
> enough as a workaround. But you may want to take care of this before
> the new release is out, which John mentioned this morning as coming
> soon.

I got it to work by changing in texmanager.py, line 203, from:

            command = 'latex -interaction=nonstopmode -output-directory="%s" \
                       "%s" > "%s"'%(self.texcache, texfile, outfile)

to:

            command = 'cd "%s" && latex -interaction=nonstopmode "%s"
> "%s"' % \
                      (self.texcache,texfile, outfile)

This will work with any version of latex.

On FC4 (and FC5) we've got version 3.0 of tetex:
$ rpm -q tetex
tetex-3.0-10.FC4

So it looks like the Badger's dragging the chain in this case :slight_smile:

Fernando Perez wrote:

···

But aside from my own troubles, I suspect that if you guys release
0.87.4 with this bug, I won't be the only one complaining :slight_smile: There
are probably other systems out there still not using tetex-3.0 (I
think Red Hat enterprise is fairly conservative in its upgrade policy,
and I don't know what Fedora 4 has, though Fedora 5 is likely OK).

Thanks Fernando. I'll work on this in the morning. I've been boozing all
evening...

···

On Friday 07 July 2006 6:43 pm, Fernando Perez wrote:

On 7/7/06, Fernando Perez <fperez.net@...287...> wrote:
> On 7/7/06, Fernando Perez <fperez.net@...287...> wrote:
> > Don't worry about me: I'll fix the mpl sources myself, that's easy
> > enough as a workaround. But you may want to take care of this before
> > the new release is out, which John mentioned this morning as coming
> > soon.
>
> I got it to work by changing in texmanager.py, line 203, from:
>
> command = 'latex -interaction=nonstopmode
> -output-directory="%s" \ "%s" > "%s"'%(self.texcache, texfile, outfile)
>
> to:
>
> command = 'cd "%s" && latex -interaction=nonstopmode "%s"
>
> > "%s"' % \
>
> (self.texcache,texfile, outfile)
>
> This will work with any version of latex.

But a similar change is also needed for EPS generation. I've just
attached a full patch, in case you want it.

Cheers,

f

--
Darren S. Dale, Ph.D.
dd55@...163...

Enjoy the evening, and in the morning, watch out for the

cd foo && command

syntax I used. It's valid bash, but I don't know about win32...

Take care,

f

···

On 7/7/06, Darren Dale <dd55@...163...> wrote:

Thanks Fernando. I'll work on this in the morning. I've been boozing all
evening...

Hi Fernando,

···

On Friday 07 July 2006 10:36 pm, you wrote:

On 7/7/06, Darren Dale <dd55@...163...> wrote:
> Thanks Fernando. I'll work on this in the morning. I've been boozing all
> evening...

Enjoy the evening, and in the morning, watch out for the

cd foo && command

syntax I used. It's valid bash, but I don't know about win32...

The fix took a little more work in order to address a problem Wolfgang
reported with win32 a while back. Both texmanager and backend_ps have been
improved and tested on a bleeding edge gentoo system and a windows system.

Iff you have time, would you please update to svn 2550 and test the new usetex
code? Otherwise, I can test it on a RHEL4 system Monday morning.

Darren

The joys of X11, I can actually test this (the fedora box is in my
office). It works just fine, thanks a lot!

But I did notice something a bit odd, by accident. I made up a random
title for a test plot with various symbols, and the exported eps file
shows a strange thing: look at the integral limits in the attached
eps. The -\infty is smooth (as is all the rest of the latex), while
the \beta is all jaggy. With ubuntu's gv it's not super visible until
you zoom in, but with Fedora's it really stands out.

Not a big issue, but I did find it a bit strange. You know a lot more
about this, so the reason behind it may be obvious to you.

In any case, many thanks for getting this up and running again!

Cheers,

f

foo.eps.gz (12.5 KB)

···

On 7/8/06, Darren Dale <dd55@...163...> wrote:

Hi Fernando,

On Friday 07 July 2006 10:36 pm, you wrote:
> On 7/7/06, Darren Dale <dd55@...163...> wrote:
> > Thanks Fernando. I'll work on this in the morning. I've been boozing all
> > evening...
>
> Enjoy the evening, and in the morning, watch out for the
>
> cd foo && command
>
> syntax I used. It's valid bash, but I don't know about win32...

The fix took a little more work in order to address a problem Wolfgang
reported with win32 a while back. Both texmanager and backend_ps have been
improved and tested on a bleeding edge gentoo system and a windows system.

Iff you have time, would you please update to svn 2550 and test the new usetex
code? Otherwise, I can test it on a RHEL4 system Monday morning.

I think this is artifact results from a combination of the ghostscript
distiller and the postscript renderer. If you have xpdf on your system, you
can set ps.usedistiller : xpdf in rc. That will give you embeddable eps files
without converting the fonts to outlines (or whatever ghostscript does), so
they scale nicely. As a bonus, if you put the figure in a pdf, the figure
text will be searchable.

Darren

···

On Sunday 09 July 2006 12:53 am, you wrote:

> The fix took a little more work in order to address a problem Wolfgang
> reported with win32 a while back. Both texmanager and backend_ps have
> been improved and tested on a bleeding edge gentoo system and a windows
> system.
>
> Iff you have time, would you please update to svn 2550 and test the new
> usetex code? Otherwise, I can test it on a RHEL4 system Monday morning.

The joys of X11, I can actually test this (the fedora box is in my
office). It works just fine, thanks a lot!

But I did notice something a bit odd, by accident. I made up a random
title for a test plot with various symbols, and the exported eps file
shows a strange thing: look at the integral limits in the attached
eps. The -\infty is smooth (as is all the rest of the latex), while
the \beta is all jaggy. With ubuntu's gv it's not super visible until
you zoom in, but with Fedora's it really stands out.

Not a big issue, but I did find it a bit strange. You know a lot more
about this, so the reason behind it may be obvious to you.

Thanks for the tip! The result looks indeed very nice, but
unfortunately the bounding box is all wrong (using ps.distiller=False
gives eps files with the proper bounding box). With an incorrect
bounding box, these eps files are kind of useless (not completely,
since ps2eps can correct this, but it's annoying to have to fix every
plot you make manually...)

Any ideas?

Cheers,

f

···

On 7/9/06, Darren Dale <dd55@...163...> wrote:

I think this is artifact results from a combination of the ghostscript
distiller and the postscript renderer. If you have xpdf on your system, you
can set ps.usedistiller : xpdf in rc. That will give you embeddable eps files
without converting the fonts to outlines (or whatever ghostscript does), so
they scale nicely. As a bonus, if you put the figure in a pdf, the figure
text will be searchable.

Would you send me an example of a file with a bad bbox and one that is
correct?

···

On Sunday 09 July 2006 10:28 pm, Fernando Perez wrote:

On 7/9/06, Darren Dale <dd55@...163...> wrote:
> I think this is artifact results from a combination of the ghostscript
> distiller and the postscript renderer. If you have xpdf on your system,
> you can set ps.usedistiller : xpdf in rc. That will give you embeddable
> eps files without converting the fonts to outlines (or whatever
> ghostscript does), so they scale nicely. As a bonus, if you put the
> figure in a pdf, the figure text will be searchable.

Thanks for the tip! The result looks indeed very nice, but
unfortunately the bounding box is all wrong (using ps.distiller=False
gives eps files with the proper bounding box). With an incorrect
bounding box, these eps files are kind of useless (not completely,
since ps2eps can correct this, but it's annoying to have to fix every
plot you make manually...)

Any ideas?

Cheers,

f

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Darren S. Dale, Ph.D.
dd55@...163...

Thanks for looking into this!

f

distill_false_bbox_ok.eps.gz (10.5 KB)

distill_xpdf_bbox_bad.eps.gz (12.4 KB)

···

On 7/9/06, Darren Dale <dd55@...163...> wrote:

Would you send me an example of a file with a bad bbox and one that is
correct?

Could the bug I submitted some time ago be related to this ? (1502970
at http://sourceforge.net/tracker/?group_id=80706&atid=560720)

For example, this fails for me (it does work without xpdf and doing
ps2pdf afterwards):
My poppler/xpdf installation should be allright

import matplotlib
matplotlib.use('PS')
import pylab

pylab.rc('text',usetex=True)
pylab.rc('ps',usedistiller='xpdf')
pylab.figure()
pylab.plot((1,2,3),(4,5,6))
pylab.savefig("test")
pylab.show()

···

---
Summary:
matplotlib-0.87.3 with xpdf renders empty PS
upraded to matplotlib-0.87-3/numpy-0.9.8.

When setting ps.usedistiller to xpdf, I get an empty (blank) ps image.
Without xpdf, I get a proper ps. This did work with 0.87-2/numpy-0.9.6
(The Pdf backend works, but not with mathttext.)

---

Bye,
Pieter

On 7/10/06, Fernando Perez <fperez.net@...287...> wrote:

On 7/9/06, Darren Dale <dd55@...163...> wrote:
> Would you send me an example of a file with a bad bbox and one that is
> correct?

Thanks for looking into this!

f

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Pieter Dumon wrote:

Could the bug I submitted some time ago be related to this ? (1502970
at http://sourceforge.net/tracker/?group_id=80706&atid=560720)

For example, this fails for me (it does work without xpdf and doing
ps2pdf afterwards):
My poppler/xpdf installation should be allright

import matplotlib
matplotlib.use('PS')
import pylab

pylab.rc('text',usetex=True)
pylab.rc('ps',usedistiller='xpdf')
pylab.figure()
pylab.plot((1,2,3),(4,5,6))
pylab.savefig("test")
pylab.show()

---
Summary:
matplotlib-0.87.3 with xpdf renders empty PS
upraded to matplotlib-0.87-3/numpy-0.9.8.

When setting ps.usedistiller to xpdf, I get an empty (blank) ps image.
Without xpdf, I get a proper ps. This did work with 0.87-2/numpy-0.9.6
(The Pdf backend works, but not with mathttext.)
  

Please set your verbose level to debug-annoying in your rc settings and post the output. Also post your platform info, along with version info for xpdf, and ghostscript. I havent had any problems with xpdf.

Hi Fernando,

I tried opening your example of a bad eps file produced with the xpdf option,
and it looks identical to the good example you sent. (I opened it with both
ggv, and gv.)

Darren

···

On Sunday 09 July 2006 23:33, Fernando Perez wrote:

On 7/9/06, Darren Dale <dd55@...163...> wrote:
> Would you send me an example of a file with a bad bbox and one that is
> correct?

Thanks for looking into this!

f

--
Darren S. Dale, Ph.D.
Cornell High Energy Synchrotron Source
Cornell University
200L Wilson Lab
Rt. 366 & Pine Tree Road
Ithaca, NY 14853

dd55@...163...
office: (607) 255-9894
fax: (607) 255-9001

The debug output is in attachment. I don't see any errors, except for
the latex warning (but the problem is the same without usetex=True,
apparently)

ESP Ghostscript 815.02 (2006-04-19)
xpdf version 3.01
poppler-0.5.3

System is a quite standard Gentoo Linux (x86), but with gcc-4.1.1
2.6.16-gentoo-r9 #1 PREEMPT Tue Jun 6 10:38:13 CEST 2006 i686 Mobile
Intel(R) Pentium(R) 4 - M CPU 2.00GHz GNU/Linux

Pieter

debug.log (4.47 KB)

···

On 7/10/06, Darren Dale <dd55@...163...> wrote:

Pieter Dumon wrote:
> For example, this fails for me (it does work without xpdf and doing
> ps2pdf afterwards):

> import matplotlib
> matplotlib.use('PS')
> import pylab
>
> pylab.rc('text',usetex=True)
> pylab.rc('ps',usedistiller='xpdf')
> pylab.figure()
> pylab.plot((1,2,3),(4,5,6))
> pylab.savefig("test")
> pylab.show()
>
> When setting ps.usedistiller to xpdf, I get an empty (blank) ps image.
> Without xpdf, I get a proper ps. This did work with 0.87-2/numpy-0.9.6
> (The Pdf backend works, but not with mathttext.)
>
Please set your verbose level to debug-annoying in your rc settings and
post the output. Also post your platform info, along with version info
for xpdf, and ghostscript. I havent had any problems with xpdf.

Sorry, forgot the actual PS file, which contains the actual error. Here it is

test.ps (25.7 KB)

···

On 7/10/06, Pieter Dumon <pieter.dumon@...287...> wrote:

On 7/10/06, Darren Dale <dd55@...163...> wrote:
> Pieter Dumon wrote:
> > For example, this fails for me (it does work without xpdf and doing
> > ps2pdf afterwards):

> > import matplotlib
> > matplotlib.use('PS')
> > import pylab
> >
> > pylab.rc('text',usetex=True)
> > pylab.rc('ps',usedistiller='xpdf')
> > pylab.figure()
> > pylab.plot((1,2,3),(4,5,6))
> > pylab.savefig("test")
> > pylab.show()
> >
> > When setting ps.usedistiller to xpdf, I get an empty (blank) ps image.
> > Without xpdf, I get a proper ps. This did work with 0.87-2/numpy-0.9.6
> > (The Pdf backend works, but not with mathttext.)
> >
> Please set your verbose level to debug-annoying in your rc settings and
> post the output. Also post your platform info, along with version info
> for xpdf, and ghostscript. I havent had any problems with xpdf.

The debug output is in attachment. I don't see any errors, except for
the latex warning (but the problem is the same without usetex=True,
apparently)

ESP Ghostscript 815.02 (2006-04-19)
xpdf version 3.01
poppler-0.5.3

System is a quite standard Gentoo Linux (x86), but with gcc-4.1.1
2.6.16-gentoo-r9 #1 PREEMPT Tue Jun 6 10:38:13 CEST 2006 i686 Mobile
Intel(R) Pentium(R) 4 - M CPU 2.00GHz GNU/Linux

Pieter

This is a known bug in ESP Ghostscript, not matplotlib. ESP version 8.15.02
broke xpdf's pdftops program. I posted a bug report to the ESP website, and
it has been fixed in their sources, but they havent made a new release since
that time. Your options are either to drop back to ESP version 7.07 or use
gpl or afpl ghostscript.

Darren

···

On Monday 10 July 2006 08:58, Pieter Dumon wrote:

Sorry, forgot the actual PS file, which contains the actual error. Here it
is

On 7/10/06, Pieter Dumon <pieter.dumon@...287...> wrote:
> On 7/10/06, Darren Dale <dd55@...163...> wrote:
> > Pieter Dumon wrote:
> > > For example, this fails for me (it does work without xpdf and doing
> > > ps2pdf afterwards):
> > >
> > > import matplotlib
> > > matplotlib.use('PS')
> > > import pylab
> > >
> > > pylab.rc('text',usetex=True)
> > > pylab.rc('ps',usedistiller='xpdf')
> > > pylab.figure()
> > > pylab.plot((1,2,3),(4,5,6))
> > > pylab.savefig("test")
> > > pylab.show()
> > >
> > > When setting ps.usedistiller to xpdf, I get an empty (blank) ps
> > > image. Without xpdf, I get a proper ps. This did work with
> > > 0.87-2/numpy-0.9.6 (The Pdf backend works, but not with mathttext.)
> >
> > Please set your verbose level to debug-annoying in your rc settings and
> > post the output. Also post your platform info, along with version info
> > for xpdf, and ghostscript. I havent had any problems with xpdf.
>
> The debug output is in attachment. I don't see any errors, except for
> the latex warning (but the problem is the same without usetex=True,
> apparently)
>
> ESP Ghostscript 815.02 (2006-04-19)
> xpdf version 3.01
> poppler-0.5.3
>
> System is a quite standard Gentoo Linux (x86), but with gcc-4.1.1
> 2.6.16-gentoo-r9 #1 PREEMPT Tue Jun 6 10:38:13 CEST 2006 i686 Mobile
> Intel(R) Pentium(R) 4 - M CPU 2.00GHz GNU/Linux
>
> Pieter

--
Darren S. Dale, Ph.D.
Cornell High Energy Synchrotron Source
Cornell University
200L Wilson Lab
Rt. 366 & Pine Tree Road
Ithaca, NY 14853

dd55@...163...
office: (607) 255-9894
fax: (607) 255-9001