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

[MNT]: Remove the label API from Artist #29422

Open
@timhoffm

Description

@timhoffm

Summary

Artist provides the label API intended to for legend labels:

image

However, only a small subset of Artists are "data" Artists and can be reasonably used in a legend. From the subclasses of Artist:

  • suitable for legend: Line2D, Collection, Patch
  • not suitable for legend: AnnotationBbox, Text, Tick, Axis, FigureBase, Legend, _AxesBase, Table, OffsetBox, _ImageBase, QuiverKey

In some of these not-suitable classeslabel is repurposed for other use cases, e.g. axis labels, figure labels being displayed as window title. That's quite confusing.

Proposed fix

Create a Protocol or Mixin or DataArtist subclass for legend labels and use that in Line2D, Collection, Patch. Deprecate and removeget/set_label from all other Artists; possibly taking special measures wherelabel is currently repurposed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp