From: Darren D. <dsd...@gm...> - 2010-08-02 14:19:55
|
On Mon, Aug 2, 2010 at 10:15 AM, Richard Lincoln <r.w...@gm...> wrote: > I am having trouble creating a plot using TeX which has a $ sign in > one of the axis labels. If I run: > > import matplotlib > > matplotlib.rc('font', **{'family': 'serif', 'serif': ['Computer Modern Roman']}) > matplotlib.rc('text', usetex=True) > > import pylab > > pylab.figure() > pylab.plot([0.0, 1.0]) > pylab.ylabel("Profit (\$)") > pylab.savefig('/tmp/fig.pdf') > > > I get the error: Try: pylab.ylabel(r"Profit (\$)") |