avni.gui module#

class avni.gui.SelectFromCollection(ax, collection, alpha_other=0.3)[source]#

Bases: object

Select indices from a matplotlib collection using LassoSelector.

Selected indices are saved in the ind attribute. This tool highlights selected points by fading them out (i.e., reducing their alpha values). If your collection has alpha < 1, this tool will permanently alter them.

Note that this tool selects collection objects based on their origins (i.e., offsets).

Parameters
axAxes

Axes to interact with.

collectionmatplotlib.collections.Collection subclass

Collection you want to select from.

alpha_other0 <= float <= 1

To highlight a selection, this tool sets all selected points to an alpha value of 1 and non-selected points to alpha_other.

onselect(verts)[source]#
disconnect()[source]#