>> Example: >> >> latexstring("an equation: \$1 + \\alpha^2\$") > > I think for PyPlot it works equally well without `latexstring` since > pyplot will handle that directly.
Sorry that was a bad example without interpolation. But the original example needs latexstring, no? julia> s = "\\frac{1}{2}" "\\frac{1}{2}" julia> title(latexstring("\$$s\$")) PyObject <matplotlib.text.Text object at 0x7fb99a7ce6a0> (Note the `\\` in `s`) >> On Tue, 2015-12-15 at 14:26, Štěpán Starosta <stepan.staro...@gmail.com> >> wrote: >>> Hi, >>> >>> this works for me >>> >>> using PyPlot >>> imshow([1 1]) >>> title(L"\frac{1}{2}") >>> >>> I get the latex compiled. I want to print a label in latex based on a >>> variable, i.e., something like this >>> >>> s = "\frac{1}{2}" >>> title(L"$s") >>> >>> but I end up with "$s" printed in the image. I'd be grateful for any advice.