How to set the path variable?
zdlspace0528 opened this issue · comments
zdlspace0528 commented
julia> using PGFPlotsX
using LaTeXStrings
w = range(0; stop = 2π, length = 40)
v = range(0; stop = 2π, length = 40)
f(w,v)= sin(w)*sin(v)
fig = @pgf Axis(
{
#view = (0, 90), #to rotate the figure set "view" to true
colorbar,
"colormap/viridis",
#"colormap/jet",
height = "10cm",
width = "16cm",
grid = "major",
xlabel = L"w",
ylabel = L"v",
title = "A nice plot",
},
Plot3(
{
surf,
#shader = "flat",
},
Coordinates(w, v, @. (f(w, v')))
)
)
ERROR: PGFPlotsX.MissingExternalProgramError("No LaTeX installation found, figures will not be generated. Make sure either pdflatex, xelatex or lualatex are installed and that the PATH variable is correctly set.")
Stacktrace:
[1] latexengine()
@ PGFPlotsX ~/.julia/packages/PGFPlotsX/pUwhF/src/build.jl:19
[2] save(filename::String, td::TikzDocument)
@ PGFPlotsX ~/.julia/packages/PGFPlotsX/pUwhF/src/tikzdocument.jl:73
[3] #save#69
@ ~/.julia/packages/PGFPlotsX/pUwhF/src/tikzpicture.jl:34 [inlined]
[4] save
@ ~/.julia/packages/PGFPlotsX/pUwhF/src/tikzpicture.jl:34 [inlined]
[5] save(filename::String, axislike::Axis; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ PGFPlotsX ~/.julia/packages/PGFPlotsX/pUwhF/src/axislike.jl:45
[6] save
@ ~/.julia/packages/PGFPlotsX/pUwhF/src/axislike.jl:45 [inlined]
[7] display(d::PGFPlotsX.PGFPlotsXDisplay, p::Axis)
@ PGFPlotsX ~/.julia/packages/PGFPlotsX/pUwhF/src/tikzdocument.jl:356
[8] display(x::Any)
@ Base.Multimedia ./multimedia.jl:328
[9] #invokelatest#2
@ ./essentials.jl:716 [inlined]
[10] invokelatest
@ ./essentials.jl:714 [inlined]
[11] (::VSCodeServer.var"#65#69"{Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/eval.jl:176
[12] withpath(f::VSCodeServer.var"#65#69"{Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams}, path::String)
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/repl.jl:184
[13] (::VSCodeServer.var"#64#68"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/eval.jl:153
[14] hideprompt(f::VSCodeServer.var"#64#68"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/repl.jl:36
[15] (::VSCodeServer.var"#63#67"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/eval.jl:124
[16] with_logstate(f::Function, logstate::Any)
@ Base.CoreLogging ./logging.jl:511
[17] with_logger
@ ./logging.jl:623 [inlined]
[18] (::VSCodeServer.var"#62#66"{VSCodeServer.ReplRunCodeRequestParams})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/eval.jl:201
[19] #invokelatest#2
@ ./essentials.jl:716 [inlined]
[20] invokelatest(::Any)
@ Base ./essentials.jl:714
[21] macro expansion
@ ~/.vscode/extensions/julialang.language-julia-1.6.17/scripts/packages/VSCodeServer/src/eval.jl:34 [inlined]
[22] (::VSCodeServer.var"#60#61")()
@ VSCodeServer ./task.jl:429
Tamas K. Papp commented
PATH
is an environment variable in your operating system. Generally, by installing LaTeX or one of the alternatives above, it should be found automatically.
What is your OS? Did you install LaTeX? When you open a terminal, and enter pdflatex
(or whatever you installed), is it found?