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_pt*inches_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(-2*pi,2*pi,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
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users