mpl_point_clicker._clicker.clicker#
- class mpl_point_clicker._clicker.clicker(ax, classes=1, init_class=None, markers=None, colors=None, disable_legend=False, legend_bbox=(1.04, 1), legend_loc='upper left', pick_dist=10, **line_kwargs)#
Methods
clear_positions
([classes])Clear all points of classes in classes.
on_class_changed
(func)Connect func as a callback function when the current class is changed.
on_point_added
(func)Connect func as a callback function to new points being added.
on_point_removed
(func)Connect func as a callback function when points are removed.
on_positions_set
(func)Connect func as a callback function when the set_positions function is called.
set_positions
(positions)Set the current positions for all classes.
get_positions
- __init__(ax, classes=1, init_class=None, markers=None, colors=None, disable_legend=False, legend_bbox=(1.04, 1), legend_loc='upper left', pick_dist=10, **line_kwargs)#
- Parameters:
ax (matplotlib axis) –
classes (int or list) – default is 1
init_class (int, or str, optional) – The initial class to use, otherwise will be the first class in classes
markers (list) – The marker styles to use.
colors (list) –
disable_legend (bool, default False) – If True do not display the legend.
legend_bbox (tuple) – bbox to use for the legend
legend_loc (str or int) – loc to use for the legend
pick_dist (int) – Picker distance for legend
**line_kwargs (kwargs) – Line2D objects (from ax.plot) are used to generate the markers. line_kwargs will be passed through to all of the ax.plot calls.
Methods
__init__
(ax[, classes, init_class, markers, ...])- param ax:
clear_positions
([classes])Clear all points of classes in classes.
get_positions
()on_class_changed
(func)Connect func as a callback function when the current class is changed.
on_point_added
(func)Connect func as a callback function to new points being added.
on_point_removed
(func)Connect func as a callback function when points are removed.
on_positions_set
(func)Connect func as a callback function when the set_positions function is called.
set_positions
(positions)Set the current positions for all classes.