It works. Thanks.
On Oct 31, 1:15 am, Burcin Erocal <[EMAIL PROTECTED]> wrote: > On Thu, 30 Oct 2008 20:49:33 -0700 (PDT) > > > > pong <[EMAIL PROTECTED]> wrote: > > > I plot both ln(|x|) and 1/x on the same graph and try to label them by > > > t1=text('$\frac{1}{x}$', (1,4), fontsize=14, rgbcolor='red'); > > t2=text('$\ln(|x|)$', (1,5), fontsize=14) > > > While SAGE understand perfectly what to do with \ln, it doesn't seem > > to know what to do with \frac: > > it complaints > > > Traceback (click to the left for traceback) > > ... > > $ rac{1}{x}$ (at char 0), (line:1, col:1) > > > why? it looks like \f means something... > > \f is a formfeed character, see here: > > http://www.python.org/doc/2.5.2/ref/strings.html > > putting an "r" before the quotes will give you a raw string, as > described at the end of that document. This should work: > > t1=text(r'$\frac{1}{x}$', (1,4), fontsize=14, rgbcolor='red') > > Cheers, > > Burcin --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---