[ Web Proxy ]
URL:
Viewing: https://matplotlib.org/devdocs/api/toolkits/../_as_gen/matplotlib.widgets.ToolLineHandles.html [Back]  [Original]

matplotlib.widgets.ToolLineHandles — Matplotlib 3.12.0.dev738+ge3fc0dad9 documentation
Back to top
Search the docs ...:

matplotlib.widgets.ToolLineHandles#

class matplotlib.widgets.ToolLineHandles(ax, positions, direction, *, line_props=None, useblit=True)[source]#

Control handles for canvas tools.

Parameters:
axAxes

Matplotlib Axes where tool handles are displayed.

positions1D array

Positions of handles in data coordinates.

direction{"horizontal", "vertical"}

Direction of handles, either 'vertical' or 'horizontal'

line_propsdict, optional

Additional line properties. See Line2D.

useblitbool, default: True

Whether to use blitting for faster drawing (if supported by the backend). See the tutorial Faster rendering by using blitting for details.

__init__(ax, positions, direction, *, line_props=None, useblit=True)[source]#

Methods

__init__(ax,positions,direction,*[,...])

closest(x,y)

Return index and pixel distance to closest handle.

remove()

Remove the handles artist from the figure.

set_animated(value)

Set the animated state of the handles artist.

set_data(positions)

Set x- or y-positions of handles, depending on if the lines are vertical or horizontal.

set_visible(value)

Set the visibility state of the handles artist.

Attributes

artists

direction

Direction of the handle: 'vertical' or 'horizontal'.

positions

Positions of the handle in data coordinates.

property artists#
closest(x, y)[source]#

Return index and pixel distance to closest handle.

Parameters:
x, yfloat

x, y position from which the distance will be calculated to determinate the closest handle

Returns:
index, distanceindex of the handle and its distance from

position x, y

property direction#

Direction of the handle: 'vertical' or 'horizontal'.

property positions#

Positions of the handle in data coordinates.

remove()[source]#

Remove the handles artist from the figure.

set_animated(value)[source]#

Set the animated state of the handles artist.

set_data(positions)[source]#

Set x- or y-positions of handles, depending on if the lines are vertical or horizontal.

Parameters:
positionstuple of length 2

Set the positions of the handle in data coordinates

set_visible(value)[source]#

Set the visibility state of the handles artist.


Web Proxy Viewer  |  New URL  |  Original Page