chaco.tools.draw_points_tool module

Defines the DrawPointsTool class.

class chaco.tools.draw_points_tool.DrawPointsTool(**kwtraits)

Bases: enable.base_tool.BaseTool

A tool that draws points onto a rectangular plot as they are clicked.

activated = Bool(True)

Is this the active tool?

normal_left_down(event)

Handles the left mouse button being clicked when the tool is in the ‘normal’ state.

Maps the event position into data space, adds the point to the points for this tool, and redraws.

xdata = Instance(ArrayDataSource)

A data source for the x-dimension of the drawn points.

ydata = Instance(ArrayDataSource)

A data source for the y-dimension of the drawn points.