Maybe this is a lame workaround, but I save all my matplotlib plots as eps and then run epstopdf. I actually call epstopdf through os.system in a custom save function. I have never had a problem with latex and saving eps.
On Wed, Feb 16, 2011 at 9:13 PM, Maxim <maxim.courno...@gmail.com> wrote: > But this workaround seems to prevent me from saving the fig in pdf (or > svg): > > File "/opt/SAGE/local/lib/python2.6/site-packages/matplotlib/ > dviread.py", line 727, in _register > assert encoding is None > AssertionError > > Here's the code: > # -*- coding: utf-8 -*- > from sage.all import * > import matplotlib as mpl > mpl.rcParams['text.usetex'] = True > plt = plot(sin, -pi, pi) > plt.axes_labels([ 'Valeur', r"\'{E}chantillon" ]) > save(plt,filename='/home/maxim/test.pdf') > > Same thing happens if I try to use pyplot instead. > Any clues or other ideas? > > Thanks, > Maxim > > -- > To post to this group, send email to sage-support@googlegroups.com > To unsubscribe from this group, send email to > sage-support+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-support > URL: http://www.sagemath.org > -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org