Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Labels
Description
Summary
Artist provides the label API intended to for legend labels:
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.