fastplotlib.layouts._subplot.Subplot#

class Subplot(parent, position, parent_dims, camera, controller, canvas, renderer=None, name=None)[source]#

General plot object is found within a Figure. Each Figure instance will have [n rows, n columns] of subplots.

Important

Subplot is not meant to be constructed directly, it only exists as part of a Figure

Parameters:
  • parent ('Figure' | None) – parent Figure instance

  • position ((int, int), optional) – corresponds to the [row, column] position of the subplot within a Figure

  • parent_dims ((int, int), optional) – dimensions of the parent Figure

  • camera (str or pygfx.PerspectiveCamera, default '2d') – indicates the FOV for the camera, ‘2d’ sets fov = 0, ‘3d’ sets fov = 50. fov can be changed at any time.

  • controller (str or pygfx.Controller, optional) –

    if None, uses a PanZoomController for “2d” camera or FlyController for “3d” camera.
    if str, must be one of: “panzoom”, “fly”, “trackball”, or “orbit”.
    also accepts a pygfx.Controller instance

  • canvas (BaseRenderCanvas, or a pygfx.Texture) – Provides surface on which a scene will be rendered.

  • renderer (WgpuRenderer) – object used to render scenes using wgpu

  • name (str, optional) – name of the subplot, will appear as TextGraphic above the subplot

Examples#

Image widget grid

Image widget grid

Scatter Plot Size

Scatter Plot Size

Linear Selectors Image

Linear Selectors Image

LinearRegionSelectors with LineCollection

LinearRegionSelectors with LineCollection

Explore fourier transform of images

Explore fourier transform of images

Linear Selectors

Linear Selectors

Multi-Subplot Image Update

Multi-Subplot Image Update

Scatter Animation Data

Scatter Animation Data

Scatter Animation Colors

Scatter Animation Colors