-
-
Notifications
You must be signed in to change notification settings - Fork 348
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] Empty 3D scatter plots result in an error in GR #4146
Comments
I cannot reproduce on |
I can reproduce this on |
Can you post your backtrace as well ? |
ERROR: BoundsError: attempt to access 0-element Vector{Tuple{Float64, Float64, Float64}} at index [1]
Stacktrace:
[1] getindex
@ ./array.jl:861 [inlined]
[2] unzip(v::Vector{Tuple{Float64, Float64, Float64}})
@ RecipesPipeline ~/.julia/packages/RecipesPipeline/oVorB/src/utils.jl:211
[3] gr_add_series(sp::Plots.Subplot{Plots.GRBackend}, series::Plots.Series)
@ Plots ~/.julia/packages/Plots/8K4be/src/backends/gr.jl:1845
[4] gr_display(sp::Plots.Subplot{Plots.GRBackend}, w::Measures.AbsoluteLength, h::Measures.AbsoluteLength, viewport_canvas::Vector{Float64})
@ Plots ~/.julia/packages/Plots/8K4be/src/backends/gr.jl:1005
[5] gr_display(plt::Plots.Plot{Plots.GRBackend}, fmt::String)
@ Plots ~/.julia/packages/Plots/8K4be/src/backends/gr.jl:670
[6] gr_display
@ ~/.julia/packages/Plots/8K4be/src/backends/gr.jl:636 [inlined]
[7] _display(plt::Plots.Plot{Plots.GRBackend})
@ Plots ~/.julia/packages/Plots/8K4be/src/backends/gr.jl:2199
[8] display(#unused#::Plots.PlotsDisplay, plt::Plots.Plot{Plots.GRBackend})
@ Plots ~/.julia/packages/Plots/8K4be/src/output.jl:139
[9] display(x::Any)
@ Base.Multimedia ./multimedia.jl:328
[10] #invokelatest#2
@ ./essentials.jl:716 [inlined]
[11] invokelatest
@ ./essentials.jl:714 [inlined]
[12] print_response(errio::IO, response::Any, show_value::Bool, have_color::Bool, specialdisplay::Union{Nothing, AbstractDisplay})
@ REPL ~/.asdf/installs/julia/1.7.2/share/julia/stdlib/v1.7/REPL/src/REPL.jl:293
[13] (::REPL.var"#45#46"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)
@ REPL ~/.asdf/installs/julia/1.7.2/share/julia/stdlib/v1.7/REPL/src/REPL.jl:277
[14] with_repl_linfo(f::Any, repl::REPL.LineEditREPL)
@ REPL ~/.asdf/installs/julia/1.7.2/share/julia/stdlib/v1.7/REPL/src/REPL.jl:510
[15] print_response(repl::REPL.AbstractREPL, response::Any, show_value::Bool, have_color::Bool)
@ REPL ~/.asdf/installs/julia/1.7.2/share/julia/stdlib/v1.7/REPL/src/REPL.jl:275
[16] (::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 ~/.asdf/installs/julia/1.7.2/share/julia/stdlib/v1.7/REPL/src/REPL.jl:846
[17] #invokelatest#2
@ ./essentials.jl:716 [inlined]
[18] invokelatest
@ ./essentials.jl:714 [inlined]
[19] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
@ REPL.LineEdit ~/.asdf/installs/julia/1.7.2/share/julia/stdlib/v1.7/REPL/src/LineEdit.jl:2493
[20] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
@ REPL ~/.asdf/installs/julia/1.7.2/share/julia/stdlib/v1.7/REPL/src/REPL.jl:1232
[21] (::REPL.var"#49#54"{REPL.LineEditREPL, REPL.REPLBackendRef})()
@ REPL ./task.jl:423 |
Probably he ran it from a notebook |
Ok thanks, sorry for the noise, I had a |
Thanks for solving this issue that quickly! |
It looks like github CI / actions are hanging so this might take a while to get the new version in registry for updating: |
Details
Plotting an empty
![scatter2D](https://user-images.githubusercontent.com/30291312/159650272-506faa56-acb7-4817-8665-8d37ae559c03.png)
scatter
plot (scatter([],[])
) works in 2D in GR.It, however, fails in 3D (
scatter([],[],[])
) with a very cryptic error message:Backends
This bug occurs on ( insert
x
below )Versions
Plots.jl version: 1.27.1
Backend version (
]st -m <backend(s)>
): GR v0.64.0Output of
versioninfo()
:The text was updated successfully, but these errors were encountered: