pylbo.visualisation.legend_handler

Module Contents

Classes

LegendHandler

Main handler for legend stuff.

class pylbo.visualisation.legend_handler.LegendHandler(interactive)[source]

Main handler for legend stuff.

legend

The matplotlib legend to use.

Type:

Legend

alpha_point

Alpha value for non-hidden lines or points.

Type:

int, float

alpha_region

Alpha value for non-hidden regions.

Type:

int, float

alpha_hidden

Alpha value for hidden artists.

Type:

int, float

marker

The marker to use for points.

Type:

markers

markersize

Size of the marker.

Type:

int, float

pickradius

Radius around pickable items so pickevents are triggered.

Type:

int, float

linewidth

Width of drawn lines.

Type:

int, float

legend_properties

Additional properties used when setting the legend.

Type:

dict

interactive

If True, makes the legend interactive

Type:

bool

autoscale

If True, will check if autoscale is needed when clicking the legend.

Type:

bool

on_legend_pick(event)[source]

Determines what happens when the legend gets picked.

Parameters:

event (PickEvent) – The matplotlib pick event.

make_legend_pickable()[source]

Makes the legend pickable, only used if interactive.

add(item)[source]

Adds an item to the list of drawn items on the canvas.

Parameters:

item (object) – A single object, usually a return from the matplotlib plot or scatter methods.

_check_autoscaling()[source]

Checks if autoscaling is needed and if so, rescales the y-axis to the min-max value of the currently visible legend items.