使用 matplotlib mpld3 时工具提示在缩放 in/out 后消失

Tooltips disappear after zoom in/out when using matplotlib mpld3

我有一个 matplotlib 图,在点标记上有工具提示:

并且缩放 in/out 有效:

但是在执行缩放 in/out 后,工具提示不再起作用:即使恢复原始(未缩放)大小,它们也不会恢复。

如果您使用平移缩放工具(交叉箭头图标),工具提示在缩放后应保持不变。如果您使用框缩放(放大镜图标),当框缩放处于活动状态时,工具提示将关闭。再次单击框缩放放大图标将其停用后,工具提示应再次出现。 也许这个 UI 可以更清楚。

Here is scatter plot with tooltips example you can use to see this in action.