Open lmagno opened 7 years ago
Can you save the tex file and create a minimum example for the tex file that is broken.
This is the tex from PGFPlots (works):
\RequirePackage{luatex85}
\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\pgfplotsset{every axis legend/.append style={%
cells={anchor=west}}
}
\usepgfplotslibrary{polar}
\usetikzlibrary{arrows}
\tikzset{>=stealth'}
\begin{document}
\begin{tikzpicture}[]
\begin{axis}\addplot+ coordinates {
(1.0, 1000.0)
(2.0, 1000.0)
(3.0, 1000.0)
(4.0, 999.999)
};
\end{axis}
\end{tikzpicture}
\end{document}
This is cleaned up from Plots (error)
\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\pgfplotsset{every axis legend/.append style={%
cells={anchor=west}}
}
\usepgfplotslibrary{polar}
\usetikzlibrary{arrows}
\tikzset{>=stealth'}
\begin{document}
\begin{tikzpicture}[]
\begin{axis}[width = {152.4mm}, ymax = {1000.0}, height = {101.6mm}, ymin = {999.999}, xmax = {4.0}, xmin = {1.0}]\addplot+ coordinates {
(1.0, 1000.0)
(2.0, 1000.0)
(3.0, 1000.0)
(4.0, 999.999)
};
\addlegendentry{y1}
\end{axis}
\end{tikzpicture}
\end{document}
I tried changing it to
\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\pgfplotsset{every axis legend/.append style={%
cells={anchor=west}}
}
\usepgfplotslibrary{polar}
\usetikzlibrary{arrows}
\tikzset{>=stealth'}
\begin{document}
\begin{tikzpicture}[]
\begin{axis}[width = {152.4mm}, ymax = {1000.0}, height = {101.6mm}, ymin = {999.99}, xmax = {4.0}, xmin = {1.0}]\addplot+ coordinates {
(1.0, 1000.0)
(2.0, 1000.0)
(3.0, 1000.0)
(4.0, 999.99)
};
\addlegendentry{y1}
\end{axis}
\end{tikzpicture}
\end{document}
and now it gives "undefined control sequence" instead of "dimension too large" (maybe I'm missing something, I just compiled directly with lualatex).
EDIT: turns out putting
\RequirePackage{luatex85}
solves the "undefined control sequence", so now ymin = {999.99}
is compilable, while ymin = {999.9999}
only gives the warning
Package pgfplots Warning: Axis range for axis y is approximately empty; enlargi
ng it (it is [999.9998000000000:1000.0000000]) on input line 21.
still errors on pgfplotsx-backend
I'm guessing it's because of bad ylims
. I have the same error in a different situation. Actively reorganising the data could be the way to solve it.
julia> plot(100*rand(100), ylims=(0,1))
! Dimension too large.
\pgfplotsaxisdeserializedatapointfrom@private@LUA ...
\pgfplotsaxisdeserializeda...
l.145 \end{axis}
Error showing value of type Plots.Plot{Plots.PGFPlotsXBackend}:
ERROR: The latex command `lualatex jl_Olg9KDoFQj.tex` failed
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] savepdf(filename::String, td::PGFPlotsX.TikzDocument; latex_engine::PGFPlotsX.LaTeXEngine, buildflags::Vector{String}, run_count::Int64, tmp::String)
@ PGFPlotsX C:\Users\pty\.julia\packages\PGFPlotsX\78BAg\src\tikzdocument.jl:202
[3] savepdf
@ C:\Users\pty\.julia\packages\PGFPlotsX\78BAg\src\tikzdocument.jl:159 [inlined]
[4] savesvg(filename::String, td::PGFPlotsX.TikzDocument; latex_engine::PGFPlotsX.LaTeXEngine, buildflags::Vector{String}, keep_pdf::Bool)
@ PGFPlotsX C:\Users\pty\.julia\packages\PGFPlotsX\78BAg\src\tikzdocument.jl:272
[5] savesvg
@ C:\Users\pty\.julia\packages\PGFPlotsX\78BAg\src\tikzdocument.jl:267 [inlined]
[6] save(filename::String, td::PGFPlotsX.TikzDocument; include_preamble::Bool, latex_engine::PGFPlotsX.LaTeXEngine, buildflags::Vector{String}, dpi::Int64, showing_ide::Bool)
@ PGFPlotsX C:\Users\pty\.julia\packages\PGFPlotsX\78BAg\src\tikzdocument.jl:84
[7] show(f::IOBuffer, #unused#::MIME{Symbol("image/svg+xml")}, td::PGFPlotsX.TikzDocument)
@ PGFPlotsX C:\Users\pty\.julia\packages\PGFPlotsX\78BAg\src\tikzdocument.jl:294
[8] _show(io::IOBuffer, mime::MIME{Symbol("image/svg+xml")}, plt::Plots.Plot{Plots.PGFPlotsXBackend})
@ Plots C:\Users\pty\.julia\packages\Plots\esM5q\src\backends\pgfplotsx.jl:1364
[9] #invokelatest#2
@ .\essentials.jl:816 [inlined]
[10] invokelatest
@ .\essentials.jl:813 [inlined]
[11] show
@ C:\Users\pty\.julia\packages\Plots\esM5q\src\output.jl:232 [inlined]
[12] __binrepr(m::MIME{Symbol("image/svg+xml")}, x::Plots.Plot{Plots.PGFPlotsXBackend}, context::Nothing)
@ Base.Multimedia .\multimedia.jl:171
[13] _textrepr
@ .\multimedia.jl:163 [inlined]
[14] #stringmime#8
@ C:\Applications\Julia-1.9.0\share\julia\stdlib\v1.9\Base64\src\Base64.jl:44 [inlined]
[15] stringmime
@ C:\Applications\Julia-1.9.0\share\julia\stdlib\v1.9\Base64\src\Base64.jl:44 [inlined]
[16] display(d::VSCodeServer.InlineDisplay, m::MIME{Symbol("image/svg+xml")}, x::Plots.Plot{Plots.PGFPlotsXBackend})
@ VSCodeServer c:\Users\pty\.vscode\extensions\julialang.language-julia-1.47.2\scripts\packages\VSCodeServer\src\display.jl:57
[17] display(d::VSCodeServer.InlineDisplay, mime::String, x::Any)
@ Base.Multimedia .\multimedia.jl:228
[18] display(d::VSCodeServer.InlineDisplay, x::Plots.Plot{Plots.PGFPlotsXBackend})
@ VSCodeServer c:\Users\pty\.vscode\extensions\julialang.language-julia-1.47.2\scripts\packages\VSCodeServer\src\display.jl:166
[19] display(x::Any)
@ Base.Multimedia .\multimedia.jl:340
[20] #invokelatest#2
@ .\essentials.jl:816 [inlined]
[21] invokelatest
@ .\essentials.jl:813 [inlined]
[22] print_response(errio::IO, response::Any, show_value::Bool, have_color::Bool, specialdisplay::Union{Nothing, AbstractDisplay})
@ REPL C:\Applications\Julia-1.9.0\share\julia\stdlib\v1.9\REPL\src\REPL.jl:305
[23] (::REPL.var"#57#58"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)
@ REPL C:\Applications\Julia-1.9.0\share\julia\stdlib\v1.9\REPL\src\REPL.jl:287
[24] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
@ REPL C:\Applications\Julia-1.9.0\share\julia\stdlib\v1.9\REPL\src\REPL.jl:557
[25] print_response(repl::REPL.AbstractREPL, response::Any, show_value::Bool, have_color::Bool)
@ REPL C:\Applications\Julia-1.9.0\share\julia\stdlib\v1.9\REPL\src\REPL.jl:285
[26] (::REPL.var"#do_respond#80"{Bool, Bool, REPL.var"#93#103"{REPL.LineEditREPL, REPL.REPLHistoryProvider}, REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::Any, ok::Bool)
@ REPL C:\Applications\Julia-1.9.0\share\julia\stdlib\v1.9\REPL\src\REPL.jl:899
[27] (::VSCodeServer.var"#98#101"{REPL.var"#do_respond#80"{Bool, Bool, REPL.var"#93#103"{REPL.LineEditREPL, REPL.REPLHistoryProvider}, REPL.LineEditREPL, REPL.LineEdit.Prompt}})(mi::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
@ VSCodeServer c:\Users\pty\.vscode\extensions\julialang.language-julia-1.47.2\scripts\packages\VSCodeServer\src\repl.jl:122
[28] #invokelatest#2
@ .\essentials.jl:816 [inlined]
[29] invokelatest
@ .\essentials.jl:813 [inlined]
[30] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
@ REPL.LineEdit C:\Applications\Julia-1.9.0\share\julia\stdlib\v1.9\REPL\src\LineEdit.jl:2647
[31] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
@ REPL C:\Applications\Julia-1.9.0\share\julia\stdlib\v1.9\REPL\src\REPL.jl:1300
[32] (::REPL.var"#62#68"{REPL.LineEditREPL, REPL.REPLBackendRef})()
@ REPL .\task.jl:514
Hi,
I stumbled upon this and can't figure out what is happening
It works fine using PGFPlots directly, though, and other backends.
I have