pyOMA.core.StabilDiagram.DataCursor#

class pyOMA.core.StabilDiagram.DataCursor(ax, order_data, f_data, mask=None, useblit=True, datalist=[], **lineprops)[source]#

Bases: Cursor

__init__(ax, order_data, f_data, mask=None, useblit=True, datalist=[], **lineprops)[source]#

Methods

__init__(ax, order_data, f_data[, mask, ...])

add_callback(name, func)

clear(event)

Internal event handler to clear the cursor.

connect_event(event, callback)

Connect a callback function with an event.

disconnect_events()

Disconnect all events created by this widget.

fig_resized([event])

findIndexNearestXY(x_point, y_point)

Finds the nearest neighbour

get_active()

Get whether the widget is active.

ignore(event)

Return whether event should be ignored.

onmove(event)

Internal event handler to draw the cursor when the mouse moves.

set_active(active)

Set whether the widget is active.

set_mask(mask, name)

Attributes

active

Is the widget active?

canvas

drawon

eventson

findIndexNearestXY(x_point, y_point)[source]#

Finds the nearest neighbour

Todo

currently a very inefficient brute force implementation should be replaced by e.g. a k-d-tree nearest neighbour search https://en.wikipedia.org/wiki/K-d_tree

onmove(event)[source]#

Internal event handler to draw the cursor when the mouse moves.