Hello list,

If I use DateFormatter with latex and lines breaks like this
>>> DateFormatter("\n \n %b") I get an latex error:

http://pastebin.com/m5b186ded

Although, if I do not use the line breaks,
>>> DateFormatter("%b")
The problem disappears.

Below is a script that reproduces what I'm talking about:

#Example:
from pylab            import *
from matplotlib       import rcParams
rcParams['text.usetex'] = True
fig = figure()
ax  = fig.add_subplot(111)
fig.subplots_adjust(bottom=0.2)
t = arange(100,110,.1)
u = sin(t)
v = cos(t)
quiver([t],[[0]*len(t)],u,v)
major  = DayLocator([10,04])
minor  = DayLocator()
majorF = DateFormatter("\n \n %b") # problem
#majorF = DateFormatter("%b") # no problem
minorF = DateFormatter('%d')
ax.xaxis.set_major_locator(major)
ax.xaxis.set_minor_locator(minor)
ax.xaxis.set_major_formatter(majorF)
ax.xaxis.set_minor_formatter(minorF)
gca().xaxis_date()
title(r"$\alpha \beta \gamma \delta$")
show()


I'm using the latest svn version with qt4 as backend.

Thanks, Filipe
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to