LineGraphic#

LineGraphic#

Constructor#

LineGraphic(data[, thickness, colors, cmap, ...])

Create a line Graphic, 2d or 3d

Properties#

LineGraphic.alpha

The opacity of the graphic

LineGraphic.alpha_mode

How the alpha is handled by the renderer

LineGraphic.axes

LineGraphic.block_events

Used to block events for a graphic and prevent recursion.

LineGraphic.block_handlers

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

LineGraphic.cmap

Get or set the colormap

LineGraphic.cmap_range

Get or set the (min, max) of the cmap_transform that is mapped onto the colormap

LineGraphic.cmap_transform

LineGraphic.colors

Get or set the colors

LineGraphic.dash_pattern

Get or set the dash pattern.

LineGraphic.data

Get or set the graphic's data.

LineGraphic.deleted

used to emit an event after the graphic is deleted

LineGraphic.event_handlers

Registered event handlers.

LineGraphic.imgui_right_click

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

LineGraphic.legend_item

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

LineGraphic.name

Graphic name

LineGraphic.offset

[x, y, z]

LineGraphic.rotation

Orientation of the graphic as a quaternion

LineGraphic.scale

(x, y, z) scaling factor

LineGraphic.size_space

The coordinate space in which the size is expressed ('screen', 'world', 'model')

LineGraphic.supported_events

events supported by this graphic

LineGraphic.thickness

Get or set the line thickness

LineGraphic.thin

Get or set whether the line uses the more performant thin line material, which is always one physical pixel wide.

LineGraphic.tooltip_format

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

LineGraphic.visible

Whether the graphic is visible

LineGraphic.world_object

Associated pygfx WorldObject.

Methods#

LineGraphic.add_axes()

Add axes onto this Graphic

LineGraphic.add_event_handler(*args)

Register an event handler.

LineGraphic.add_linear_region_selector([...])

Add a LinearRegionSelector.

LineGraphic.add_linear_selector([selection, ...])

Adds a LinearSelector.

LineGraphic.add_polygon_selector([selection])

Add a PolygonSelector.

LineGraphic.add_rectangle_selector([selection])

Add a RectangleSelector.

LineGraphic.append_imgui_right_click([gui])

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

LineGraphic.clear_event_handlers()

clear all event handlers added to this graphic

LineGraphic.create_legend_item([label, ...])

Create the LineLegendItem of this line, add it to a legend with Legend.add().

LineGraphic.format_pick_info(pick_info)

Takes a pygfx.PointerEvent and returns formatted pick info.

LineGraphic.map_model_to_world(position)

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

LineGraphic.map_world_to_model(position)

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

LineGraphic.remove_event_handler(callback, ...)

remove a registered event handler

LineGraphic.remove_imgui_right_click()

Remove and return the right-click popup of this graphic

LineGraphic.rotate(alpha[, axis])

Rotate the Graphic with respect to the world.

LineGraphic.set_imgui_right_click([popup, ...])

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.