GiovineItalia / Gadfly.jl

Crafty statistical graphics for Julia.
http://gadflyjl.org/stable/
Other
1.9k stars 250 forks source link

Support LaTeXStrings.jl #1094

Open SimonEnsemble opened 6 years ago

SimonEnsemble commented 6 years ago

When I pass in e.g. L"$r/r_o$" as an xlabel in Gadfly, it appears blank. Does Gadfly not support LaTeXStrings?

Mattriks commented 6 years ago

Julia can generate symbols directly: https://docs.julialang.org/en/v1/manual/unicode-input/ and Tab completion. Here is a plot I started working on for the Gadfly docs: issue1073 See also #1073

tlnagy commented 6 years ago

Is it possible to convert LaTeXStrings to Julia's unicode symbols? It would nice to be able to copy LaTeX equations from elsewhere and include them in a Gadfly plot. Also Unicode fractions look hella painful compared to \frac{top}{bottom}

SimonEnsemble commented 6 years ago

@tlnagy exactly. Plots.jl takes LaTeXStrings as input.

Mattriks commented 6 years ago

https://github.com/SimonDanisch/UnicodeFun.jl I haven't tried it, but I think doing latex → Unicode in a separate package is the way to go.

Mattriks commented 6 years ago

There is a new vscode extension for doing bulk super/subscript: https://github.com/kindlychung/supersub

Mattriks commented 3 years ago

Julia 1.6 also supports bulk super/subscript: Julialang/julia#38649.

nathanrboyer commented 2 years ago

I often need LaTeXStrings to fill in the gaps in Unicode. For example, y, z, and θ don't exist as Unicode subscripts. I like to use these to indicate direction.