fastplotlib.ui.LegendItem#

class LegendItem(graphic, label=None, cmap_transform_labels=None)[source]#

The legend representation of a graphic, created with Graphic.create_legend_item().

An item has one LegendElement per labelled value of the graphic, or an ImguiColorbar when the graphic uses a quantitative colormap. It follows the graphic: when a feature it represents changes, its elements are made again.