Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renamer and LaTeXStrings #463

Open
karlwessel opened this issue Jun 13, 2023 · 0 comments
Open

renamer and LaTeXStrings #463

karlwessel opened this issue Jun 13, 2023 · 0 comments

Comments

@karlwessel
Copy link

karlwessel commented Jun 13, 2023

Bug description

LaTeXStrings are not rendered correctly when used with renamer.

Steps to reproduce

Normally LaTeXStrings are rendered correctly, like here:

using AlgebraOfGraphics
using CairoMakie
using LaTeXStrings
ws = [1e-8, 0.5, 1]
plot = data((x=[1, 2, 3], w=ws)) * mapping(:x) * histogram()

draw(plot * mapping(row = :w => (x -> LaTeXString("\$w = $x\$"))))

fine

But when one has to reorder legends or facet entries with renamer or sorter they are not:

using AlgebraOfGraphics
using CairoMakie
using LaTeXStrings
ws = [1e-8, 0.5, 1]
plot = data((x=[1, 2, 3], w=ws)) * mapping(:x) * histogram()

order = renamer([w => LaTeXString("\$w = $w\$") for w in ws])
draw(plot * mapping(row = :w => order))

ordered

Version info

Status `/tmp/jl_v1KZbO/Project.toml`
  [cbdf2221] AlgebraOfGraphics v0.6.16
  [13f3f980] CairoMakie v0.10.6
  [b964fa9f] LaTeXStrings v1.3.0
  [44cfe95a] Pkg v1.9.0
Julia Version 1.9.1
Commit 147bdf428cd (2023-06-07 08:27 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 4 × Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, skylake)
  Threads: 2 on 4 virtual cores
Environment:
  JULIA_IMAGE_THREADS = 1
  JULIA_DEPOT_PATH =.julia:/usr/local/share/julia:/usr/share/julia
  JULIA_LOAD_PATH = @:@v#.#:@stdlib
  JULIA_REVISE_WORKER_ONLY = 1
@jkrumbiegel jkrumbiegel linked a pull request Jul 16, 2024 that will close this issue
7 tasks
@jkrumbiegel jkrumbiegel removed a link to a pull request Jul 16, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant