Subplot#

Subplot#

Constructor#

Subplot(parent, camera, controller, canvas)

Subplot class.

Properties#

Subplot.ambient_light

the ambient lighting in the scene

Subplot.animations

Returns a dictionary of 'pre' and 'post' animation functions.

Subplot.axes

Axes object

Subplot.background_color

background colors, (top left, top right, bottom right, bottom left)

Subplot.camera

camera used to view the scene

Subplot.canvas

Canvas associated to the plot area

Subplot.controller

controller used to control the camera

Subplot.directional_light

the directional lighting on the camera in the scene

Subplot.docks

The docks of this plot area.

Subplot.frame

Frame that the subplot lives in

Subplot.frame_spacing

Subplot.graphics

Graphics in the plot area.

Subplot.imgui_right_click

The imgui popup that is opened by a right-click within this subplot.

Subplot.imgui_windows

The imgui windows of this subplot, keyed by location.

Subplot.name

Subplot name

Subplot.objects

Subplot.parent

A parent if relevant

Subplot.renderer

Renderer associated to the plot area

Subplot.scene

The Scene where Graphics lie in this plot area

Subplot.selectors

Selectors in the plot area.

Subplot.title

subplot title

Subplot.toolbar

show/hide toolbar

Subplot.tooltip

The tooltip in this PlotArea

Subplot.viewport

The rectangular area of the renderer associated to this plot area

Subplot.x_range

Get or set the x-range currently in view.

Subplot.y_range

Get or set the y-range currently in view.

Methods#

Subplot.add_animations(*funcs[, pre_render, ...])

Add function(s) that are called on every render cycle.

Subplot.add_graphic(graphic[, center])

Add a Graphic to the scene

Subplot.add_image(data[, vmin, vmax, cmap, ...])

Create an ImageGraphic

Subplot.add_image_collection(data, *[, ...])

Create an ImageGraphic

Subplot.add_image_grid(data, *[, vmin, ...])

Create an ImageGraphic

Subplot.add_image_volume(data[, mode, vmin, ...])

Create an ImageVolumeGraphic.

Subplot.add_image_yuv(data[, vmin, vmax, ...])

Create an ImageYUVGraphic.

Subplot.add_imgui_window([window, location, ...])

Add an imgui window confined to this subplot.

Subplot.add_inf_line(data[, axis, ...])

Create a collection of infinite lines.

Subplot.add_line(data[, thickness, colors, ...])

Create a line Graphic, 2d or 3d

Subplot.add_line_collection(data, *[, ...])

Create a line Graphic, 2d or 3d

Subplot.add_line_stack(data, *[, thickness, ...])

Create a line Graphic, 2d or 3d

Subplot.add_mesh(positions, indices[, mode, ...])

Create a mesh Graphic.

Subplot.add_polygon(data[, mode, colors, ...])

Create a polygon mesh graphic.

Subplot.add_scatter(data[, colors, cmap, ...])

Create a Scatter Graphic, 2d or 3d

Subplot.add_scatter_collection(data, *[, ...])

Create a Scatter Graphic, 2d or 3d

Subplot.add_scatter_stack(data, *[, colors, ...])

Create a Scatter Graphic, 2d or 3d

Subplot.add_surface(data[, mode, colors, ...])

Create a Surface mesh Graphic

Subplot.add_text(text[, font_size, ...])

Create a text Graphic

Subplot.add_vectors(positions, directions[, ...])

Create graphic that draw vectors.

Subplot.append_imgui_right_click([gui])

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

Subplot.append_imgui_window([gui, location])

Append imgui elements to an existing window of this subplot.

Subplot.auto_scale(*[, maintain_aspect, zoom])

Auto-scale the camera w.r.t to the scene

Subplot.center_graphic(graphic[, zoom])

Center the camera w.r.t.

Subplot.center_scene(*[, zoom])

Auto-center the scene, does not scale.

Subplot.clear()

Clear the Plot or Subplot.

Subplot.clear_animations([removal])

Remove animation functions.

Subplot.delete_graphic(graphic)

Delete the graphic, garbage collects and frees GPU VRAM.

Subplot.get_figure([obj])

Get Figure instance that contains this plot area

Subplot.get_pick_info(pos)

Get pick info at this screen position

Subplot.insert_graphic(graphic[, center, ...])

Insert graphic into scene at given position index in stored graphics.

Subplot.map_screen_to_world(pos[, allow_outside])

Map screen (canvas) position to world position

Subplot.map_world_to_screen(pos)

Map world position to screen (canvas) position

Subplot.remove_animation(func)

Removes the passed animation function from both pre and post render.

Subplot.remove_graphic(graphic)

Remove a Graphic from the scene.

Subplot.remove_imgui_right_click()

Remove and return the right-click popup of this subplot

Subplot.remove_imgui_window(location)

Remove and return the imgui window at the given location

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

Set the imgui popup that is opened by a right-click within this subplot, replaces the Figure's popup within this subplot.