gsplot.LegendEntries#
- class LegendEntries(handles, labels, handler_map=None)#
Bases:
objectImmutable handles, labels, and local legend handler mappings.
- Parameters:
handles (
collections.abc.Sequence[matplotlib.artist.Artist]) β Native Matplotlib legend handles in display order.labels (
collections.abc.Sequence[str]) β String labels matched one-to-one withhandles.handler_map (
collections.abc.Mapping[Any,matplotlib.legend_handler.HandlerBase] | None) β Local handler mapping copied from the caller.
Notes
The mapping is frozen and is never registered in Matplotlibβs global default handler map.
Examples
>>> import gsplot as gs >>> entries = gs.LegendEntries(handles=(), labels=()) >>> entries.labels ()
- __init__(handles, labels, handler_map=None)#
- Parameters:
handles (Sequence[Artist])
labels (Sequence[str])
handler_map (Mapping[Any, HandlerBase] | None)
- Return type:
None
Methods
__init_subclass__This method is called when a class is subclassed.
__new__(**kwargs)__subclasshook__Abstract classes can override this to customize issubclass().