I am trying to add tooltips to a heatmap in VS Code/Jupyter/CairoMakie. Could someone please post some simple example code? Thanks.
The DataInspector
functionality was/is broken with heatmaps, but that’s recently been fixed: cannot mix colormaps with DataInspector · Issue #3319 · MakieOrg/Makie.jl · GitHub
The fix is currently only available on the master branch, but should be included in the next release if you’re willing to wait. Once that’s live, you should be able to do something like
fig, ax, hm = heatmap(rand(512, 512))
di = DataInspector(ax)
show(fig)
CairoMakie is not an interactive backend, so you can’t have tooltips that appear on hover (like the ones from DataInspector). If you want that you need to switch to GLMakie or WGLMakie.
If you are looking to place a static tooltip you can use the plot function documented here: tooltip · Makie
Thank you. That’s helpful. It’s often hardest to learn what a system or package can’t do that wthat it can. Bing chat and Github Copilot responds as if anything is possible.
Thanks again.