Graphic#

Graphic#

Constructor#

Graphic([name, offset, rotation, scale, ...])

Properties#

Graphic.alpha

The opacity of the graphic

Graphic.alpha_mode

How the alpha is handled by the renderer

Graphic.axes

Graphic.block_events

Used to block events for a graphic and prevent recursion.

Graphic.block_handlers

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

Graphic.deleted

used to emit an event after the graphic is deleted

Graphic.event_handlers

Registered event handlers.

Graphic.imgui_right_click

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

Graphic.legend_item

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

Graphic.name

Graphic name

Graphic.offset

[x, y, z]

Graphic.rotation

Orientation of the graphic as a quaternion

Graphic.scale

(x, y, z) scaling factor

Graphic.supported_events

events supported by this graphic

Graphic.tooltip_format

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

Graphic.visible

Whether the graphic is visible

Graphic.world_object

Associated pygfx WorldObject.

Methods#

Graphic.add_axes()

Add axes onto this Graphic

Graphic.add_event_handler(*args)

Register an event handler.

Graphic.append_imgui_right_click([gui])

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

Graphic.clear_event_handlers()

clear all event handlers added to this graphic

Graphic.format_pick_info(ev)

Takes a pygfx.PointerEvent and returns formatted pick info.

Graphic.map_model_to_world(position)

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

Graphic.map_world_to_model(position)

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

Graphic.remove_event_handler(callback, *types)

remove a registered event handler

Graphic.remove_imgui_right_click()

Remove and return the right-click popup of this graphic

Graphic.rotate(alpha[, axis])

Rotate the Graphic with respect to the world.

Graphic.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.