Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[ENH]: Data tooltip support #23378

Open
Labels
Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesNew feature
@timhoffm

Description

@timhoffm

Problem

To better support interactivity and contextual data, we should support data tooltips.

Proposed solution

Things to be done:

  1. Add tooltip API tobackend_bases. This should be similar to the picker functionality, only with hover instead of click. T.b.d.: Do we want aTooltipEvent or a more generalHoverEvent?
  2. 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.
  3. 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})')

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesNew feature

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp