Skip to content

Commit

Permalink
fix silent LaTeXString conversion (#2588)
Browse files Browse the repository at this point in the history
* fix label type change

* add test

* fix test

---------

Co-authored-by: Julius Krumbiegel <[email protected]>
  • Loading branch information
t-bltg and jkrumbiegel authored Feb 7, 2023
1 parent 5c552b5 commit b1b9ef2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions ReferenceTests/src/tests/text.jl
Original file line number Diff line number Diff line change
Expand Up @@ -359,3 +359,13 @@ end
ylims!(ax, -0.8, 0.6)
fig
end

@reference_test "label type change" begin
fig = Figure()
ax = Axis3(fig[1, 1])
ax.xlabel[] = L"1 + \alpha^2"
ax.ylabel[] = L"\lim_{x\to\infty} f(x)"
ax.zlabel[] = L"\sum_{n=1}^{\infty} 2^{-n} = 1"
fig
end

4 changes: 2 additions & 2 deletions src/makielayout/blocks/axis3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -625,11 +625,11 @@ function add_ticks_and_ticklabels!(topscene, scene, ax, dim::Int, limits, tickno
end
notify(attr(:labelalign))

label = text!(topscene, attr(:label),
label = text!(topscene, label_position,
text = attr(:label),
color = attr(:labelcolor),
fontsize = attr(:labelsize),
font = attr(:labelfont),
position = label_position,
rotation = label_rotation,
align = label_align,
visible = attr(:labelvisible),
Expand Down

0 comments on commit b1b9ef2

Please sign in to comment.