Subplot¶

Subplot¶

Constructor¶

Subplot([parent, position, parent_dims, ...])

General plot object is found within a Figure.

Properties¶

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

The docks of this plot area.

Subplot.graphics

Graphics in the plot area.

Subplot.legends

Legends in the plot area.

Subplot.name

The name of this plot area

Subplot.objects

Subplot.parent

A parent if relevant

Subplot.position

Position of this plot area within a larger layout (such as a Figure) 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.viewport

The rectangular area of the renderer associated to this plot area

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_heatmap(data[, vmin, vmax, ...])

Create an Image Graphic

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

Create an Image Graphic

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

Create a line Graphic, 2d or 3d

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

Create a collection of LineGraphic

Subplot.add_line_stack(data[, z_offset, ...])

Create a stack of LineGraphic that are separated along the "x" or "y" axis.

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

Create a Scatter Graphic, 2d or 3d

Subplot.add_text(text[, position, size, ...])

Create a text Graphic

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.center_title()

Centers name of subplot.

Subplot.clear()

Clear the Plot or Subplot.

Subplot.delete_graphic(graphic)

Delete the graphic, garbage collects and frees GPU VRAM.

Subplot.get_rect()

Returns the bounding box that defines the Subplot within the canvas.

Subplot.get_refcounts()

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

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

Subplot.map_screen_to_world(pos)

Map screen position to world 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.render()

Subplot.set_axes_visibility(visible)

Toggles axes visibility.

Subplot.set_grid_visibility(visible)

Toggles grid visibility.

Subplot.set_title(text)

Sets the plot title, stored as a TextGraphic in the "top" dock area

Subplot.set_viewport_rect(*args)