KristofferC / PGFPlotsX.jl

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

error in latex out put of surface #258

Closed elrond3000 closed 3 years ago

elrond3000 commented 3 years ago

when I tried this example

surface(range(-3,3, length=30), range(-3,3, length=30),
        (x, y)->exp(-x^2-y^2),
        label="",
        colormap_name = "viridis",
        extra_kwargs =:subplot)

I got an error :

! Package pgfkeys Error: The key '/tikz/opacity' requires a value. I am going t
o ignore this key.

See the pgfkeys package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.293         t
             able[row sep={\\}]
Error showing value of type Plots.Plot{Plots.PGFPlotsXBackend}:
ERROR: The latex command `lualatex jl_RHeWkv.tex` failed
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] savepdf(::String, ::PGFPlotsX.TikzDocument; latex_engine::PGFPlotsX.LaTeXEngine, buildflags::Array{String,1}, run_count::Int64, tmp::String) at /home/elrond/.julia/packages/PGFPlotsX/qM8D5/src/tikzdocument.jl:197
 [3] save(::String, ::PGFPlotsX.TikzDocument; include_preamble::Bool, latex_engine::PGFPlotsX.LaTeXEngine, buildflags::Array{String,1}, dpi::Int64, showing_ide::Bool) at /home/elrond/.julia/packages/PGFPlotsX/qM8D5/src/tikzdocument.jl:86
 [4] save(::String, ::PGFPlotsX.TikzDocument) at /home/elrond/.julia/packages/PGFPlotsX/qM8D5/src/tikzdocument.jl:73
 [5] display(::PGFPlotsX.PGFPlotsXDisplay, ::PGFPlotsX.TikzDocument) at /home/elrond/.julia/packages/PGFPlotsX/qM8D5/src/tikzdocument.jl:351
 [6] _display(::Plots.Plot{Plots.PGFPlotsXBackend}) at /home/elrond/.julia/packages/Plots/SjqWU/src/backends/pgfplotsx.jl:1391
 [7] display(::Plots.PlotsDisplay, ::Plots.Plot{Plots.PGFPlotsXBackend}) at /home/elrond/.julia/packages/Plots/SjqWU/src/output.jl:150
 [8] display(::Any) at ./multimedia.jl:328
 [9] #invokelatest#1 at ./essentials.jl:710 [inlined]
 [10] invokelatest at ./essentials.jl:709 [inlined]
 [11] print_response(::IO, ::Any, ::Bool, ::Bool, ::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:238
 [12] print_response(::REPL.AbstractREPL, ::Any, ::Bool, ::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:223
 [13] (::REPL.var"#do_respond#54"{Bool,Bool,REPL.var"#64#73"{REPL.LineEditREPL,REPL.REPLHistoryProvider},REPL.LineEditREPL,REPL.LineEdit.Prompt})(::Any, ::Any, ::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:822
 [14] #invokelatest#1 at ./essentials.jl:710 [inlined]
 [15] invokelatest at ./essentials.jl:709 [inlined]
 [16] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/LineEdit.jl:2355
 [17] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:1144
 [18] (::REPL.var"#38#42"{REPL.LineEditREPL,REPL.REPLBackendRef})() at ./task.jl:356

then I try to compile the .tex file directely, using latexmkthe error appear again:

! Package pgfkeys Error: The key '/tikz/opacity' requires a value. I am going t
o ignore this key.

See the pgfkeys package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.809         t
               able[row sep={\\}]
?

! Package pgfkeys Error: The key '/tikz/opacity' requires a value. I am going t
o ignore this key.

See the pgfkeys package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.1714 \end{axis}

?
[1] (./error.aux) )
Output written on error.dvi (1 page, 368028 bytes).
Transcript written on error.log.
Latexmk: Examining 'error.log'
=== TeX engine is 'pdfTeX'
Latexmk: Log file says output to 'error.dvi'
Latexmk: Errors, so I did not complete making targets
Collected error summary (may duplicate other messages):
  latex: Command for 'latex' gave return code 1
      Refer to 'error.log' for details
Latexmk: Use the -f option to force complete processing,
 unless error was exceeding maximum runs, or warnings treated as errors.

I try to install julia 1.5.3 on a virtual machine and this error apperas again. Can anyone help me to figure it out? Thanks!

KristofferC commented 3 years ago

Did you mean to post this on the Plots.jl repo? The code looks like it is from Plots.jl.

elrond3000 commented 3 years ago

I used PGFPlotsX as backend and this error appear. But other backends work fine. I will try to post this on Plots.jl. Thank you for your help!