LaTeX code for titles, labels,... with Plots.jl

Hi Nils,

I found that for the title and gr() backend one has to use the latexstring() function directly instead of L"some latex code".

Below an example code

using Plots, LaTeXStrings

gr()

date = "07-08-2018"
titlestring = latexstring("\\mathrm{My\\, \\alpha\\, including\\, a\\, variable\\, date:\\,}", date)

plot(sin, (0:0.01:5*pi), dpi=300,
     title = titlestring,
     xlabel = L"\mathrm{My\, x-label\, (mJ/cm^{3})}",
     ylabel = L"\mathrm{\alpha (m/s)}")

Rob.

6 Likes