mpl_point_clicker._clicker.clicker#

class mpl_point_clicker._clicker.clicker(ax, classes, init_class=None, markers=None, colors=None, legend_bbox=(1.04, 1), legend_loc='upper left', pick_dist=10, **line_kwargs)#

Methods

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, init_class=None, markers=None, colors=None, legend_bbox=(1.04, 1), legend_loc='upper left', pick_dist=10, **line_kwargs)#
Parameters:
  • ax (matplotlib axis) –

  • classes (int or list) –

  • 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) –

  • 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:

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.