Hi,
I have been having some issues with generating my desired tick labels in Makie. I would like to use LaTeX style formatting (for example \rho_{B}). Unfortunately, Makie does not seem to accept LatexStrings for the axis ticks. For example;
using GLMakie, LaTeXStrings
# Create some dummy data
x = 0:0.05:1
y = 0:0.05:1
f(x, y) = 2 * cos(5 * x - 2 * y) + 3 * sin(3 * x + 4 * y)
z = f.(x, y')
# Create the figure, make it a 3D plot with specified ticks
fig = Figure()
# These don't work
#xtcks = ([0.1, 0.8], [L"\rho_{b}", L"\rho_{E}"])
#ytcks = ([0.2, 0.6], [L"\alpha_{b}", L"\alpha_{E}"])
# These run, but doesn't render the expected outcome.
xtcks = ([0.1, 0.8], ["\$\\rho_{B}\$", "\$\\rho_{E}\$"])
ytcks = ([0.2, 0.6], ["b", "E"])
# In the axis label, works exactly as expected.
ax = Axis3(fig[1, 1], xticks = xtcks, yticks = ytcks, xlabel = L"$\rho_{B}$")
surf = surface!(ax, x, y, z)
# fig
Attempting to use the LaTeXString version of the ticks yields the error
TypeError: in typeassert, expected Vector{Tuple{String, Point{2, Float32}}}, got a value of type Vector{Tuple{LaTeXString, Point{2, Float32}}}
If LaTeXStrings are not usable in axis ticks, what would be the best way to get the desired outcome like the one shown in the axis label? I casting the LaTeXString to string using julia String()
but that did work either.