On Nov 17, 1:04 pm, Vince <[email protected]> wrote:
> Hi all,
>
> I've been trying to input a "beta" in to the legend for one of my
> plots, using something like:
>
> list_plot([[1,2],[2,3]],axes_labels=['$\beta$','y'])
>
> However this seems to fail as \b is (well at least I think it is) a
> python command (all other latex commands I've put through seem to go
> through without a problem). Is there a way around this?

There are others that cause problems as well.  The usual workaround
is

list_plot([[1,2],[2,3]],axes_labels=['$\\beta$','y'])

where the \\ escapes the \.   I think another solution would be

list_plot([[1,2],[2,3]],axes_labels=[r'$\beta$','y'])

which tells Python it's a "raw" string.

I always have to remind myself of this stuff - it always trips me up -
so it's good to have the opportunity to do so for someone else and
keep it fresh and on the brain. :)

- kcrisman

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to