fastplotlib.ui.Legend#

class Legend(items=None)[source]#

An imgui legend.

Add the legend items of graphics and colorbars to it, imgui lays them out in the order they were added. A legend is an imgui window, place it with Figure.add_imgui_window() or Subplot.add_imgui_window().

Parameters:

items (list of LegendItem | ImguiColorbar, optional) – items to add to the legend

Examples#

ImGUI Legend

ImGUI Legend

ImGUI Legend with Markers

ImGUI Legend with Markers