RectangleSelector#

RectangleSelector#

Constructor#

RectangleSelector(selection, limits[, ...])

Create a RectangleSelector graphic which can be used to select a rectangular region of data.

Properties#

RectangleSelector.alpha

The opacity of the graphic

RectangleSelector.alpha_mode

How the alpha is handled by the renderer

RectangleSelector.axes

RectangleSelector.axis

RectangleSelector.block_events

Used to block events for a graphic and prevent recursion.

RectangleSelector.block_handlers

Used to block event handlers for a graphic and prevent recursion.

RectangleSelector.deleted

used to emit an event after the graphic is deleted

RectangleSelector.edge_color

Returns the edge color of the selector

RectangleSelector.event_handlers

Registered event handlers.

RectangleSelector.fill_color

Returns the fill color of the selector, None if selector has no fill.

RectangleSelector.imgui_right_click

The imgui popup that is opened by a right-click on this graphic.

RectangleSelector.legend_item

The legend item of this graphic, created with create_legend_item().

RectangleSelector.limits

Return the limits of the selector.

RectangleSelector.name

Graphic name

RectangleSelector.offset

[x, y, z]

RectangleSelector.parent

Graphic that selector is associated with.

RectangleSelector.rotation

Orientation of the graphic as a quaternion

RectangleSelector.scale

(x, y, z) scaling factor

RectangleSelector.selection

(xmin, xmax, ymin, ymax) of the rectangle selection

RectangleSelector.supported_events

events supported by this graphic

RectangleSelector.tooltip_format

set a custom tooltip format function which takes a pick_info dict and returns a str to be displayed in the tooltip

RectangleSelector.vertex_color

Returns the vertex color of the selector, None if selector has no vertices.

RectangleSelector.visible

Whether the graphic is visible

RectangleSelector.world_object

Associated pygfx WorldObject.

Methods#

RectangleSelector.add_axes()

Add axes onto this Graphic

RectangleSelector.add_event_handler(*args)

Register an event handler.

RectangleSelector.append_imgui_right_click([gui])

Append imgui elements to the right-click popup of this graphic.

RectangleSelector.clear_event_handlers()

clear all event handlers added to this graphic

RectangleSelector.format_pick_info(ev)

Takes a pygfx.PointerEvent and returns formatted pick info.

RectangleSelector.get_selected_data([...])

Get the Graphic data bounded by the current selection.

RectangleSelector.get_selected_index()

Not implemented for this selector

RectangleSelector.get_selected_indices([graphic])

Returns the indices of the Graphic data bounded by the current selection.

RectangleSelector.map_model_to_world(position)

map position from model (data) space to world space, basically applies the world affine transform

RectangleSelector.map_world_to_model(position)

map position from world space to model (data) space, basically applies the inverse world affine transform

RectangleSelector.remove_event_handler(...)

remove a registered event handler

RectangleSelector.remove_imgui_right_click()

Remove and return the right-click popup of this graphic

RectangleSelector.rotate(alpha[, axis])

Rotate the Graphic with respect to the world.

RectangleSelector.set_imgui_right_click([...])

Set the imgui popup that is opened by a right-click on this graphic, replaces the popup of the subplot or Figure for this graphic.