GR.jl
GR.jl copied to clipboard
latex errors
On julia 1.3 and 1.4, and windows 10, using LaTeXStrings with the gr backend in Plots
'latex' is not recognized as an internal or external command, operable program or batch file.
latex: failed to create a dvi file
This has appeared on a number of different systems.
The first seems to be solved by build LaTeXStrings.
The second seems to require dvips and it isn't clear to me how to install this on Windows. I assume it should get installed automatically as part of the build?
In the meantime, GR has an inline LaTeX renderer. Did you really use the latest GR version?
ENV["GRDIR"]=""
] up
] build GR
Example:
using GR
using LaTeXStrings
plot(rand(10), ylabel=L"- \frac{{\hbar ^2}}{{2m}}\frac{{\partial ^2 \psi (x,t)}}{{\partial x^2 }} + U(x)\psi (x,t) = i\hbar \frac{{\partial \psi (x,t)}}{{\partial t}}")
I'm having the same problem on Windows. Using LaTeXStrings as well, here is what happens for me:
In my terminal, when I run cat a | latex, then dvipng texput1.dvi (where a is the LaTeX file with my desired title), this works correctly and I get a PNG:
But it's not getting there when I call plot.
Looks like the error is happening here; is there any way to run this in a more verbose mode or something like that?
You are using Plots.jl, right?
You are using Plots.jl, right?
@jheinen yes - using Plots.jl with the GR backend.
I added support for vector fonts in Plots#master (link).
Could you please try to use plot(..., fontname="sans-serif")