Open
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 classes label 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 remove get/set_label
from all other Artists; possibly taking special measures where label is currently repurposed.