matplotlib 中的点和线工具提示?
我有一个带有一些线段的图表(LineCollection)和一些点。这些线和点有一些与之相关的值,但未用图表表示。我希望能够添加鼠标悬停工具提示或其他方法来轻松查找点和线的关联值。对于点或线段来说这可能吗?
I have a graph with some line segments (LineCollection) and some points. These lines and points have some values associated with them that are not graphed. I would like to be able to add a mouse-over tool-tip or other method of easily finding the associated value for the points and line. Is this possible for either points or lines segments?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对于积分,我已经找到办法了,但是你必须使用WX后端
For points, I have found a way, but you have to use the WX backend
这是一个旧线程,但如果有人正在寻找如何向行添加工具提示,这有效:
It's an old thread, but in case anyone is looking for how to add tooltips to lines, this works:
也许这个食谱的变体可以满足你想要的积分?至少不限于wx后端。
Perhaps a variation on this recipe would do what you want for points? At least it isn't restricted to wx backend.