LineCollection#

LineCollection#

Constructor#

LineCollection(data, *[, thickness, colors, ...])

Create a collection of graphics of the same type.

Properties#

LineCollection.alpha

The opacity of the graphic

LineCollection.alpha_mode

How the alpha is handled by the renderer

LineCollection.alpha_modes

get or set the alpha_modes of the graphics in the collection

LineCollection.alphas

get or set the alphas of the graphics in the collection

LineCollection.axes

LineCollection.block_events

Used to block events for a graphic and prevent recursion.

LineCollection.block_handlers

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

LineCollection.cmap

get or set the colormap(s) across the collection

LineCollection.cmap_range

get or set the cmap_range of the graphics in the collection

LineCollection.cmap_transform

get or set the cmap_transform across the collection

LineCollection.colors

get or set the colors of the graphics in the collection

LineCollection.dash_pattern

get or set the dash_pattern of the graphics in the collection

LineCollection.data

get or set the data of the graphics in the collection

LineCollection.deleted

used to emit an event after the graphic is deleted

LineCollection.event_handlers

Registered event handlers.

LineCollection.graphics

the graphics in the collection

LineCollection.imgui_right_click

The imgui popup of each graphic of this collection, in order.

LineCollection.legend_item

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

LineCollection.metadatas

get or set the metadatas of the graphics in the collection

LineCollection.name

Graphic name

LineCollection.names

get or set the names of the graphics in the collection

LineCollection.offset

[x, y, z]

LineCollection.offsets

get or set the offsets of the graphics in the collection

LineCollection.rotation

Orientation of the graphic as a quaternion

LineCollection.rotations

get or set the rotations of the graphics in the collection

LineCollection.scale

(x, y, z) scaling factor

LineCollection.scales

get or set the scales of the graphics in the collection

LineCollection.size_space

get or set the size_space of the graphics in the collection

LineCollection.supported_events

events supported by this graphic

LineCollection.thickness

get or set the thickness of the graphics in the collection

LineCollection.tooltip_format

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

LineCollection.visible

Whether the graphic is visible

LineCollection.visibles

get or set the visibles of the graphics in the collection

LineCollection.world_object

Associated pygfx WorldObject.

Methods#

LineCollection.add_axes()

Add axes onto this Graphic

LineCollection.add_event_handler(*args)

Register an event handler.

LineCollection.add_graphic(graphic)

Add a graphic to the collection.

LineCollection.add_linear_region_selector([...])

Add a LinearRegionSelector.

LineCollection.add_linear_selector([...])

Add a LinearSelector.

LineCollection.add_polygon_selector([selection])

Add a PolygonSelector.

LineCollection.add_rectangle_selector([...])

Add a RectangleSelector.

LineCollection.append_imgui_right_click([gui])

Append imgui elements to the popup of every graphic of this collection.

LineCollection.clear_event_handlers()

clear all event handlers added to this graphic

LineCollection.format_pick_info(ev)

Takes a pygfx.PointerEvent and returns formatted pick info.

LineCollection.map_model_to_world(position)

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

LineCollection.map_world_to_model(position)

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

LineCollection.remove_event_handler(...)

remove a registered event handler

LineCollection.remove_graphic(graphic)

Remove a graphic from the collection.

LineCollection.remove_imgui_right_click(popup)

Remove popup from every graphic of this collection that has it set.

LineCollection.rotate(alpha[, axis])

Rotate the Graphic with respect to the world.

LineCollection.set_imgui_right_click([...])

Set the imgui popup opened by a right-click on any graphic of this collection.