Open lmarcon1 opened 4 years ago
@SimonDanisch?
Observables don't work with meshscatter currently, because you can't change the mesh. I think that we had a workaround for that somewhere, or we could just delete the mesh and replot.
No, it's not about the mesh, changing that actually works (kinda ironic, since it seems more complicated)... Resizing the list of attributes per element doesn't work. You can pre allocate a larger array and then setting them to NaN or so should work...
How can we delete the mesh and replot it? I am not sure whether this is about the meshplot or resizing of the elements. Any update here?
Hi to everyone and to SimonDanisch ,
First of all congrats for the project. I am trying to use a slider to select the data to plot in "meshscatter", but when I do it I get these errors:
setindex! at /home/jjsermor/.julia/packages/Observables/qCJWB/src/Observables.jl:83 [inlined] [29] #696 at /home/jjsermor/.julia/packages/AbstractPlotting/B5nOF/src/interaction/events.jl:29 [inlined] [30] (::getfield(Observables, Symbol("#g#15")){getfield(AbstractPlotting, Symbol("##696#697")){Base.RefValue{Bool},Base.RefValue{AbstractPlotting.Mouse.Button},Base.RefValue{AbstractPlotting.Mouse.DragEnum},Events},Tuple{Observables.Observable{Tuple{Float64,Float64}},Observables.Observable{Set{AbstractPlotting.Mouse.Button}}}})(::Tuple{Float64,Float64}) at /home/jjsermor/.julia/packages/Observables/qCJWB/src/Observables.jl:136 [31] #setindex!#1(::getfield(Observables, Symbol("##2#4")), ::Function, ::Observables.Observable{Tuple{Float64,Float64}}, ::Tuple{Float64,Float64}) at /home/jjsermor/.julia/packages/Observables/qCJWB/src/Observables.jl:87 [32] setindex! at /home/jjsermor/.julia/packages/Observables/qCJWB/src/Observables.jl:83 [inlined] [33] (::getfield(GLMakie, Symbol("#cursorposition#48")){Observables.Observable{Tuple{Float64,Float64}}})(::GLFW.Window, ::Float64, ::Float64) at /home/jjsermor/.julia/packages/GLMakie/5wmnA/src/events.jl:207 [34] _CursorPosCallbackWrapper(::GLFW.Window, ::Float64, ::Float64) at /home/jjsermor/.julia/packages/GLFW/e257h/src/callback.jl:43 [35] PollEvents at /home/jjsermor/.julia/packages/GLFW/e257h/src/glfw3.jl:585 [inlined] [36] #renderloop#36(::Float64, ::getfield(GLMakie, Symbol("##37#39")), ::Function, ::GLMakie.Screen) at /home/jjsermor/.julia/packages/GLMakie/5wmnA/src/rendering.jl:7 [37] renderloop(::GLMakie.Screen) at /home/jjsermor/.julia/packages/GLMakie/5wmnA/src/rendering.jl:2 [38] (::getfield(GLMakie, Symbol("##31#33")))() at ./task.jl:259
I am using this simple code:
If I use scatter! instead of meshscatter it works. However, I need to use meshscatter because I would like to plot some 3D geometries. Are observables working with meshscatter?
Thanks in advance