-
-
Notifications
You must be signed in to change notification settings - Fork 308
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
cannot mix colormaps with DataInspector #3319
Comments
Can you try master? I think this is fixed! |
I just tried master and I get the same behavior on both of the scenarios above. |
Ah sorry, I mixed up your issues. |
Ok, I can extract extract the raw values from Gray such that colormap works. But then DataInspector is expected to show that raw value. Do you agree? |
Yeah, does it on master? |
Nope, also on master DataInspector crashes: using GLMakie
fig, = image(rand(10, 10), axis=(yreversed=true,), interpolate=false, colormap=:viridis)
DataInspector(fig)
fig Error in callback:
MethodError: no method matching interpolated_getindex(::Vector{RGBA{Float32}}, ::Float32, ::MakieCore.Automatic)
Closest candidates are:
interpolated_getindex(::AbstractArray{T}, ::AbstractFloat) where T
@ Makie D:\z_installed_programs\julia-depot\packages\Makie\NrrbP\src\colorsampler.jl:46
interpolated_getindex(::AbstractArray, ::Number, ::Union{Tuple{Vararg{T, N}}, StaticArray{Tuple{N}, T, 1}} where {N, T})
@ Makie D:\z_installed_programs\julia-depot\packages\Makie\NrrbP\src\colorsampler.jl:34
Stacktrace:
[1] show_imagelike(inspector::DataInspector, plot::Image{Tuple{StepRangeLen{Float32, Float64, Float64, Int64}, StepRangeLen{Float32, Float64, Float64, Int64}, Matrix{Float32}}}, name::String, edge_based::Bool)
@ Makie D:\z_installed_programs\julia-depot\packages\Makie\NrrbP\src\interaction\inspector.jl:663
[2] show_data
@ D:\z_installed_programs\julia-depot\packages\Makie\NrrbP\src\interaction\inspector.jl:624 [inlined]
[3] show_data_recursion(inspector::DataInspector, plot::Image{Tuple{StepRangeLen{Float32, Float64, Float64, Int64}, StepRangeLen{Float32, Float64, Float64, Int64}, Matrix{Float32}}}, idx::UInt32)
@ Makie D:\z_installed_programs\julia-depot\packages\Makie\NrrbP\src\interaction\inspector.jl:339
[4] on_hover(inspector::DataInspector)
@ Makie D:\z_installed_programs\julia-depot\packages\Makie\NrrbP\src\interaction\inspector.jl:307
[5] (::Makie.var"#1152#1156"{DataInspector})(#unused#::Tuple{Float64, Float64})
@ Makie D:\z_installed_programs\julia-depot\packages\Makie\NrrbP\src\interaction\inspector.jl:280 |
What I did: pkg> add GLMakie#master Shall I also add Makie to master, beside GLMakie? I don't have Makie as explicit dependency, only GLMakie. |
This code ignores the colormap attribute and show a gray level image. DataInspector works here.
This code shows a nicely colored image, but on hovering over the image the DataInspector crashes with the following error.
The text was updated successfully, but these errors were encountered: