MakieOrg / Makie.jl

Interactive data visualizations and plotting in Julia
https://docs.makie.org/stable
MIT License
2.4k stars 307 forks source link

DataInspector shall show Gray(val) for gray images #3320

Open MariusDrulea opened 11 months ago

MariusDrulea commented 11 months ago

The tooltip shall be img[7, 4] = Gray(0.58)

using GLMakie
using ColorTypes

fig = Figure()
image(fig[1, 1], Gray.(rand(10, 10)), axis=(yreversed=true,), interpolate=false)
DataInspector(fig)
fig

image

ffreyer commented 9 months ago

This should only require a new overload for these functions: https://github.com/MakieOrg/Makie.jl/blob/182c3faaa958f06c5d3e5ea81356925d69881d1e/src/interaction/inspector.jl#L37-L46