KristofferC / PGFPlotsX.jl

Plots in Julia using the PGFPlots LaTeX package
Other
301 stars 40 forks source link

Handling of special characters in labels #278

Closed BambOoxX closed 2 years ago

BambOoxX commented 2 years ago

When using Plots with PGFPlotsX as a backend, characters that should be escaped in LaTeX are not handled, which leads to compilation erros. With GR as a backend, it's the opposite.

As, AFAIK, Plots should be quite backend agnostic for such basic settings, don't you think PGFPlotsX should handle such characters automatically ?

See this example

using Plots
pgfplotsx()
plot(rand(10),ylabel=raw"something in %") # <-- this fails
plot(rand(10),ylabel=raw"something in \%") # <-- this works

gr()
plot(rand(10),ylabel=raw"something in %") # <-- this works
plot(rand(10),ylabel=raw"something in \%") # <-- this fails (but not your problem, more likely the same fundamental issue in GR)

plotlyjs()
plot(rand(10),ylabel=raw"something in %") # <-- this works
plot(rand(10),ylabel=raw"something in \%") # <-- this works too (but shows the "\")
tpapp commented 2 years ago

Please provide an example of the bug (if any) using PGFPlotsX (not as a backend, but directly), or open an issue for Plots.jl.

BambOoxX commented 2 years ago

@tpapp, I guess I am at the wrong place for this, sorry for bothering you. I will re-open this in the Plots issue tracker.