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

LoadError: UndefVarError: LaTeXString not defined #308

Closed
davorh opened this issue Jan 31, 2023 · 4 comments · Fixed by JuliaPlots/Plots.jl#4647
Closed

LoadError: UndefVarError: LaTeXString not defined #308

davorh opened this issue Jan 31, 2023 · 4 comments · Fixed by JuliaPlots/Plots.jl#4647

Comments

@davorh
Copy link

davorh commented Jan 31, 2023

The code that was working before stopped executing properly when updated to Julia 1.8.5. Minimal example

using Plots
using Plots.PlotMeasures
using LaTeXStrings
using PGFPlotsX
using DelimitedFiles

pgfplotsx(size=(900,900), legend=true,grid = false,framestyle =:box,xlim = (1.1,5.3),ylim = (-0.1,3.0),xminorticks=2,yminorticks=2)

Gives this output:

┌ Warning: Error requiring PGFPlotsX from Plots
│ exception =
│ LoadError: UndefVarError: LaTeXString not defined
│ Stacktrace:
│ [1] top-level scope
│ @ ~/.julia/packages/Plots/modjX/src/backends/pgfplotsx.jl:1027
│ [2] include(mod::Module, _path::RelocatableFolders.Path)
│ @ Base ./Base.jl:419
│ [3] include(x::RelocatableFolders.Path)
│ @ Plots ~/.julia/packages/Plots/modjX/src/Plots.jl:1
│ [4] top-level scope
│ @ ~/.julia/packages/Plots/modjX/src/backends.jl:101
│ [5] eval
│ @ ./boot.jl:368 [inlined]
│ [6] eval
│ @ ~/.julia/packages/Plots/modjX/src/Plots.jl:1 [inlined]
│ [7] (::Plots.var"#636#639")()
│ @ Plots ~/.julia/packages/Requires/Z8rfN/src/require.jl:101
│ [8] macro expansion
│ @ timing.jl:382 [inlined]
│ [9] err(f::Any, listener::Module, modname::String, file::String, line::Any)
│ @ Requires ~/.julia/packages/Requires/Z8rfN/src/require.jl:47
│ [10] (::Plots.var"#635#638")()
│ @ Plots ~/.julia/packages/Requires/Z8rfN/src/require.jl:100
│ [11] withpath(f::Any, path::String)
│ @ Requires ~/.julia/packages/Requires/Z8rfN/src/require.jl:37
│ [12] (::Plots.var"#634#637")()
│ @ Plots ~/.julia/packages/Requires/Z8rfN/src/require.jl:99
│ [13] listenpkg(f::Any, pkg::Base.PkgId)
│ @ Requires ~/.julia/packages/Requires/Z8rfN/src/require.jl:20
│ [14] macro expansion
│ @ ~/.julia/packages/Requires/Z8rfN/src/require.jl:98 [inlined]
│ [15] top-level scope
│ @ ~/.julia/packages/Plots/modjX/src/backends.jl:100
│ [16] eval
│ @ ./boot.jl:368 [inlined]
│ [17] _pre_imports(#unused#::Plots.PGFPlotsXBackend)
│ @ Plots ~/.julia/packages/Plots/modjX/src/backends.jl:1368
│ [18] _initialize_backend(pkg::Plots.PGFPlotsXBackend)
│ @ Plots ~/.julia/packages/Plots/modjX/src/backends.jl:1377
│ [19] backend(pkg::Plots.PGFPlotsXBackend)
│ @ Plots ~/.julia/packages/Plots/modjX/src/backends.jl:266
│ [20] #pgfplotsx#320
│ @ ~/.julia/packages/Plots/modjX/src/backends.jl:87 [inlined]
│ [21] top-level scope
│ @ In[2]:1
│ [22] eval
│ @ ./boot.jl:368 [inlined]
│ [23] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
│ @ Base ./loading.jl:1428
│ [24] softscope_include_string(m::Module, code::String, filename::String)
│ @ SoftGlobalScope ~/.julia/packages/SoftGlobalScope/u4UzH/src/SoftGlobalScope.jl:65
│ [25] execute_request(socket::ZMQ.Socket, msg::IJulia.Msg)
│ @ IJulia ~/.julia/packages/IJulia/6TIq1/src/execute_request.jl:67
│ [26] #invokelatest#2
│ @ ./essentials.jl:729 [inlined]
│ [27] invokelatest
│ @ ./essentials.jl:726 [inlined]
│ [28] eventloop(socket::ZMQ.Socket)
│ @ IJulia ~/.julia/packages/IJulia/6TIq1/src/eventloop.jl:8
│ [29] (::IJulia.var"#15#18")()
│ @ IJulia ./task.jl:484
│ in expression starting at /home/sanjinb/.julia/packages/Plots/modjX/src/backends/pgfplotsx.jl:1027
└ @ Requires ~/.julia/packages/Requires/Z8rfN/src/require.jl:51

@KristofferC
Copy link
Owner

I think this is a Plots issue JuliaPlots/Plots.jl#4566 (comment).

@mkitti
Copy link

mkitti commented Jan 31, 2023

Removing using PGFPlotsX succeeds for me.

using Plots
using Plots.PlotMeasures
using LaTeXStrings
using DelimitedFiles

pgfplotsx(size=(900,900), legend=true,grid = false,framestyle =:box,xlim = (1.1,5.3),ylim = (-0.1,3.0),xminorticks=2,yminorticks=2)

using PGFPlotsX

@davorh
Copy link
Author

davorh commented Feb 1, 2023 via email

@tpapp
Copy link
Collaborator

tpapp commented Mar 6, 2023

Closing the issue.

@tpapp tpapp closed this as completed Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants