Cutom scatter tooltip with Makie's DataInspector

Hi all,

Does anyone have an example on how to implement a simple custom tooltip for a scatterplot in Makie? After reading the DataInspector documentation I was unsure if I need to implement my own plot type or whether I can customize the tooltip content with an argument somewhere.

Thanks!

If you don’t implement your own plot type you probably need to replace the show_data method for scatter.
https://github.com/JuliaPlots/Makie.jl/blob/78d71c5609684ebbeaea7e073740582798d59330/src/interaction/inspector.jl#L540-L555

What do you want the tooltip to show?

Thanks a lot, I’ll give that a try.
My final use case involves showing different kinds of metadata on hover for the vertices in a patent citation network. But I thought I’d start with the simpler scatter case to do something like what VegaLite or Plotly allow. Maybe the best way will indeed be to implement a custom plot type in the end but the recipe system always seemed a bit daunting.