Problem
To better support interactivity and contextual data, we should support data tooltips.
Proposed solution
Things to be done:
- Add tooltip API to
backend_bases. This should be similar to the picker functionality, only with hover instead of click. T.b.d.: Do we want a TooltipEvent or a more general HoverEvent?
- Implement that API for the backends. As a first step or prove of concept one could start with one backend, e.g. Qt and add the other backends later. ipympl could/should follow at some point as well.
- Add high-level API to support setting tooltips.
We likely want at least:
- explicit strings:
plt.plot(x, y, tooltip=['A', 'B', 'C', 'D'])
data support: plt.plot('x', 'y', tooltip='label', data=data)
- functions:
plt.plot(x, y, tooltip=lambda x, y: f'({x}, {y})')
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})')