WeBWorK Main Forum

tex formatted characters in graph labels

tex formatted characters in graph labels

by David Stowell -
Number of replies: 1
does anyone know how to put labels using tex formattin on dynamically generated graphs? (for example \theta or \pi)

Here is a snippet of code


$gr[0] = init_graph($xmin,$xmin,$xmax,$xmax,'axes'=>[0,0], grid=>[4,4]);
$gr[0]->lb('reset');
$gr[0]->lb(new Label(03,-0.25,"\pi ",'black','center','middle'));


This is obviously not giving me what I want. Any suggestions?

Thanks
In reply to David Stowell

Re: tex formatted characters in graph labels

by Davide Cervone -
Currently there is no current method for doing this, as far as I know. You may be able to get some character (and pi may be one of them) by using their unicode positions, e.g., "\x{3C0}" for pi, but I haven't check it. It would depend on the coverage available in the font used for the labels, and my recollection is that they are pretty restricted.