【发布时间】:2017-01-21 11:57:04
【问题描述】:
我正在尝试使用 matplotlib 创建一个绘图,当悬停悬停图表的某些元素时会出现工具提示。我想在 Jupyter Notebook 中使用 python 3 执行此操作。
我已经尝试过这里提供的 sn-ps:
http://matplotlib.org/examples/event_handling/pick_event_demo.html
Possible to make labels appear when hovering over a point in matplotlib?
Is there a matplotlib equivalent of MATLAB's datacursormode?
Matplotlib basemap: Popup box
但它们都不起作用。该图显示但不是交互式的。
我尝试了有无魔法%matplotlib inline,但没有任何效果。
当然,我还修改了没有括号的打印语句。
是否有特定的命令或后端可用于在 Jupyter 中进行交互?
编辑: 使用 mpld3 的示例“有效”,但我宁愿坚持使用基本的 matplotlib。
【问题讨论】:
标签: python matplotlib