Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] plot_title errors #4141

Closed
albheim opened this issue Mar 14, 2022 · 2 comments · Fixed by #4142
Closed

[BUG] plot_title errors #4141

albheim opened this issue Mar 14, 2022 · 2 comments · Fixed by #4142

Comments

@albheim
Copy link

albheim commented Mar 14, 2022

Details

Backends

This bug occurs on ( insert x below )

Backend yes no untested
gr (default) x
pyplot x
plotlyjs x
pgfplotsx x
unicodeplots x
inspectdr x
gaston x

Versions

Plots.jl version: Plots v1.27.0
Backend version (]st -m <backend(s)>): PGFPlotsX v1.4.1
Output of versioninfo():

Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)

Output of lualatex --version:

This is LuaHBTeX, Version 1.13.2 (TeX Live 2021)

Execute  'luahbtex --credits'  for credits and version details.

There is NO warranty. Redistribution of this software is covered by
the terms of the GNU General Public License, version 2 or (at your option)
any later version. For more information about these matters, see the file
named COPYING and the LuaTeX source.

LuaTeX is Copyright 2021 Taco Hoekwater and the LuaTeX Team.

Problem

The plot_title keyword seems to error for the PGFPlotsX backend, not sure if there is something with my latex installation or something in the PGFPlotsX package, but since it was with a keyword from Plots.jl that it errored on, and the offending tex code seems to be \clip \pgfextra{\pgfplotspathaxisoutline} which can be found in Plots.jl, I felt this might be a place to start at least.

julia> using Plots
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]

julia> pgfplotsx()
[ Info: Precompiling PGFPlotsX [8314cec4-20b6-5062-9cdb-752b83310925]
Plots.PGFPlotsXBackend()

julia> plot(plot_title="hello")
! Package pgfplots Error: Can't install a clippath here - the command has not y
et been prepared..

See the pgfplots package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.37     \clip \pgfextra{\pgfplotspathaxisoutline}
                                                ;
Error showing value of type Plots.Plot{Plots.PGFPlotsXBackend}:
ERROR: The latex command `lualatex jl_oBxj2i.tex` failed
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] savepdf(filename::String, td::PGFPlotsX.TikzDocument; latex_engine::PGFPlotsX.LaTeXEngine, buildflags::Vector{String}, run_count::Int64, tmp::String)
    @ PGFPlotsX ~/.julia/packages/PGFPlotsX/1SEv2/src/tikzdocument.jl:197
  [3] save(filename::String, td::PGFPlotsX.TikzDocument; include_preamble::Bool, latex_engine::PGFPlotsX.LaTeXEngine, buildflags::Vector{String}, dpi::Int64, showing_ide::Bool)
    @ PGFPlotsX ~/.julia/packages/PGFPlotsX/1SEv2/src/tikzdocument.jl:86
  [4] save(filename::String, td::PGFPlotsX.TikzDocument)
    @ PGFPlotsX ~/.julia/packages/PGFPlotsX/1SEv2/src/tikzdocument.jl:73
  [5] display(d::PGFPlotsX.PGFPlotsXDisplay, p::PGFPlotsX.TikzDocument)
    @ PGFPlotsX ~/.julia/packages/PGFPlotsX/1SEv2/src/tikzdocument.jl:351
  [6] _display(plt::Plots.Plot{Plots.PGFPlotsXBackend})
    @ Plots ~/.julia/packages/Plots/cPJQu/src/backends/pgfplotsx.jl:1516
  [7] display(#unused#::Plots.PlotsDisplay, plt::Plots.Plot{Plots.PGFPlotsXBackend})
    @ Plots ~/.julia/packages/Plots/cPJQu/src/output.jl:139
  [8] display(x::Any)
    @ Base.Multimedia ./multimedia.jl:328
  [9] #invokelatest#2
    @ ./essentials.jl:716 [inlined]
 [10] invokelatest
    @ ./essentials.jl:714 [inlined]
 [11] print_response(errio::IO, response::Any, show_value::Bool, have_color::Bool, specialdisplay::Union{Nothing, AbstractDisplay})
    @ REPL ~/.julia/juliaup/julia-1.7.2+0~x64/share/julia/stdlib/v1.7/REPL/src/REPL.jl:293
 [12] (::REPL.var"#45#46"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)
    @ REPL ~/.julia/juliaup/julia-1.7.2+0~x64/share/julia/stdlib/v1.7/REPL/src/REPL.jl:277
 [13] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
    @ REPL ~/.julia/juliaup/julia-1.7.2+0~x64/share/julia/stdlib/v1.7/REPL/src/REPL.jl:510
 [14] print_response(repl::REPL.AbstractREPL, response::Any, show_value::Bool, have_color::Bool)
    @ REPL ~/.julia/juliaup/julia-1.7.2+0~x64/share/julia/stdlib/v1.7/REPL/src/REPL.jl:275
 [15] (::REPL.var"#do_respond#66"{Bool, Bool, REPL.var"#77#87"{REPL.LineEditREPL, REPL.REPLHistoryProvider}, REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::Any, ok::Bool)
    @ REPL ~/.julia/juliaup/julia-1.7.2+0~x64/share/julia/stdlib/v1.7/REPL/src/REPL.jl:846
 [16] #invokelatest#2
    @ ./essentials.jl:716 [inlined]
 [17] invokelatest
    @ ./essentials.jl:714 [inlined]
 [18] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit ~/.julia/juliaup/julia-1.7.2+0~x64/share/julia/stdlib/v1.7/REPL/src/LineEdit.jl:2493
 [19] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL ~/.julia/juliaup/julia-1.7.2+0~x64/share/julia/stdlib/v1.7/REPL/src/REPL.jl:1232
 [20] (::REPL.var"#49#54"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL ./task.jl:423
@t-bltg
Copy link
Member

t-bltg commented Mar 14, 2022

I can reproduce with

using Plots; pgfplotsx()
Plots.pdf(plot(plot_title="hello"), "hello.pdf")
$ lualatex --version
This is LuaHBTeX, Version 1.13.0 (TeX Live 2021)
[...]

@BeastyBlacksmith BeastyBlacksmith changed the title [BUG] [BUG] plot_title errors Mar 14, 2022
@BeastyBlacksmith
Copy link
Member

This was added in #3957

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants