Problem with using font sizes < 10 with usetex (MPL 0.9.0): scrambled text

Hi List,

my rendered latex fonts do not get
displayed correctly when I use font sizes smaller than 10. I use linux
with the following latex version:
pdfeTeX 3.141592-1.30.5-2.2 (Web2C 7.5.5)

When
integrating the eps in my latex script the font inside the plots
consists just of small vertical lines instead of the text. When I use a
font size larger or equal than 10 the text gets displayed correctly.
The problem seems to be font-family independent.

Where could be the problem? Matplotlib, latex? Does someone has the same problem?

Here
is some example code, it is from the matplotlib cookbook with the font
size changed which produces a plot with scrambled text:

import pylab
from pylab import arange,pi,sin,cos,sqrt
fig_width_pt = 246.0 # Get this from LaTeX using \showthe\columnwidth
inches_per_pt = 1.0/72.27 # Convert pt to inch
golden_mean = (sqrt(5)-
1.0)/2.0 # Aesthetic ratio
fig_width = fig_width_ptinches_per_pt # width in inches
fig_height = fig_width
golden_mean # height in inches
fig_size = [fig_width,fig_height]
params = {‘backend’: ‘ps’,

      'axes.labelsize': 8,
      'text.fontsize': 8,
      'xtick.labelsize': 8,
      'ytick.labelsize': 8,
      'text.usetex': True,
      '

figure.figsize’: fig_size}
pylab.rcParams.update(params)

Generate data

x = pylab.arange(-2pi,2pi,0.01)
y1 = sin(x)
y2 = cos(x)

Plot data

pylab.figure(1)
pylab.clf()
pylab.axes([0.125,
0.2
,0.95-0.125,0.95-0.2])
pylab.plot(x,y1,‘g:’,label=’$\sin(x)$’)
pylab.plot(x,y2,’-b’,label=’$\cos(x)$’)
pylab.xlabel(’$x$ (radians)’)
pylab.ylabel(’$y$’)

pylab.legend
()
pylab.savefig(‘fig1.eps’)

Cheers,
Whyking

Hi List,

my rendered latex fonts do not get
displayed correctly when I use font sizes smaller than 10. I use linux
with the following latex version:
pdfeTeX 3.141592-1.30.5-2.2 (Web2C 7.5.5)

When
integrating the eps in my latex script the font inside the plots
consists just of small vertical lines instead of the text. When I use a
font size larger or equal than 10 the text gets displayed correctly.
The problem seems to be font-family independent.

Where could be the problem? Matplotlib, latex? Does someone has the same problem?

Here
is some example code, it is from the matplotlib cookbook with the font
size changed which produces a plot with scrambled text:

import pylab
from pylab import arange,pi,sin,cos,sqrt
fig_width_pt = 246.0 # Get this from LaTeX using \showthe\columnwidth
inches_per_pt = 1.0/72.27 # Convert pt to inch
golden_mean = (sqrt(5)-
1.0)/2.0 # Aesthetic ratio
fig_width = fig_width_ptinches_per_pt # width in inches
fig_height = fig_width
golden_mean # height in inches
fig_size = [fig_width,fig_height]
params = {‘backend’: ‘ps’,

      'axes.labelsize': 8,
      'text.fontsize': 8,
      'xtick.labelsize': 8,
      'ytick.labelsize': 8,
      'text.usetex': True,
      '

figure.figsize’: fig_size}
pylab.rcParams.update(params)

Generate data

x = pylab.arange(-2pi,2pi,0.01)
y1 = sin(x)
y2 = cos(x)

Plot data

pylab.figure(1)
pylab.clf()
pylab.axes([0.125,
0.2
,0.95-0.125,0.95-0.2])
pylab.plot(x,y1,‘g:’,label=’$\sin(x)$’)
pylab.plot(x,y2,’-b’,label=’$\cos(x)$’)
pylab.xlabel(’$x$ (radians)’)
pylab.ylabel(’$y$’)

pylab.legend
()
pylab.savefig(‘fig1.eps’)

Cheers,
Whyking

No problems here. I'm using the same version of latex that you are. Fonts
render correctly with both the ghostscript (default) and xpdf distiller
options.

Darren

···

On Monday 14 May 2007 9:33:06 am Whyking wrote:

Hi List,

my rendered latex fonts do not get displayed correctly when I use font
sizes smaller than 10. I use linux with the following latex version:
pdfeTeX 3.141592-1.30.5-2.2 (Web2C 7.5.5)

When integrating the eps in my latex script the font inside the plots
consists just of small vertical lines instead of the text. When I use a
font size larger or equal than 10 the text gets displayed correctly. The
problem seems to be font-family independent.

Where could be the problem? Matplotlib, latex? Does someone has the same
problem?

I just tried it with xpdf distiller (didn’t know about that option before) and it works fine! So ghostscript seems to be the problem. I use ghostscript-esp 8.15.4, maybe there is some incompatibility there?

Anyway, for me the problem is fixed. Thanks a lot!

Whyking

···

On 5/14/07, Darren Dale <dd55@…163…> wrote:

On Monday 14 May 2007 9:33:06 am Whyking wrote:

Hi List,

my rendered latex fonts do not get displayed correctly when I use font
sizes smaller than 10. I use linux with the following latex version:

pdfeTeX 3.141592-1.30.5-2.2 (Web2C 7.5.5)

When integrating the eps in my latex script the font inside the plots
consists just of small vertical lines instead of the text. When I use a
font size larger or equal than 10 the text gets displayed correctly. The

problem seems to be font-family independent.

Where could be the problem? Matplotlib, latex? Does someone has the same
problem?

No problems here. I’m using the same version of latex that you are. Fonts

render correctly with both the ghostscript (default) and xpdf distiller
options.

Darren

That could be, I'm using GPL ghostscript 8.54.

···

On Monday 14 May 2007 10:00:22 am Whyking wrote:

On 5/14/07, Darren Dale <dd55@...163...> wrote:
> On Monday 14 May 2007 9:33:06 am Whyking wrote:
> > Hi List,
> >
> > my rendered latex fonts do not get displayed correctly when I use font
> > sizes smaller than 10. I use linux with the following latex version:
> > pdfeTeX 3.141592-1.30.5-2.2 (Web2C 7.5.5)
> >
> > When integrating the eps in my latex script the font inside the plots
> > consists just of small vertical lines instead of the text. When I use a
> > font size larger or equal than 10 the text gets displayed correctly.
> > The problem seems to be font-family independent.
> >
> > Where could be the problem? Matplotlib, latex? Does someone has the
> > same problem?
>
> No problems here. I'm using the same version of latex that you are. Fonts
> render correctly with both the ghostscript (default) and xpdf distiller
> options.
>
> Darren

I just tried it with xpdf distiller (didn't know about that option before)
and it works fine! So ghostscript seems to be the problem. I use
ghostscript-esp 8.15.4, maybe there is some incompatibility there?