Strange output with matplotlib usetex

Joined
Mar 9, 2011
Messages
2
Reaction score
0
I have a somewhat odd problem that gives text rendered using matplotlib's usetex option a 'cartoony' look. I'm not sure exactly how to describe it so I made a picture.

http://i.imgur.com/CjKlU.png

The left text was generated using matplotlib and the right side was rendered using MikTeX+TeXnic center. For some reason, the alignment of the characters in matplotlib is slightly uneven. This problem makes text look unprofessional and is not pleasing to the eye. The problem is somewhat mitigated depending on the zoom level you view the text at but it is quite pronounced at typical reading levels.

I am saving the plot as a .eps file and putting it in my tex document as a figure. The following code reproduces my problem

Code:
from pylab import *

rc('text', usetex=True)
rc('font', family='serif')
rc('font', size=14.0)

yv = sin(arange(0,0.1,10))
plot(yv)
title('Aircraft')
savefig('aircraft.eps')

I'm fairly new to python and tex so any input will be appreciated.

I have Miktex 2.9, matplotlib 1.0.1, and python 2.6 on Windows 7 x64.
 
Joined
Mar 9, 2011
Messages
2
Reaction score
0
I fixed my problem -- I did not realize that using the default settings in matplotlib rasterized text (at a crude resolution). I have sinced added the line

rc('ps', usedistiller='xpdf')

and installed the xpdf package. My text looks much, much better now.

This post can be deleted.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top