-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
[ENH]: Data tooltip support #23378
Copy link
Copy link
Open
Labels
Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesNew feature
Milestone
Metadata
Metadata
Assignees
Labels
Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesNew feature
Problem
To better support interactivity and contextual data, we should support data tooltips.
Proposed solution
Things to be done:
backend_bases. This should be similar to the picker functionality, only with hover instead of click. T.b.d.: Do we want aTooltipEventor a more generalHoverEvent?We likely want at least:
plt.plot(x, y, tooltip=['A', 'B', 'C', 'D'])datasupport:plt.plot('x', 'y', tooltip='label', data=data)plt.plot(x, y, tooltip=lambda x, y: f'({x}, {y})')