fastplotlib.layouts._subplot.Subplot

class Subplot(parent=None, position=None, parent_dims=None, camera='2d', controller=None, canvas=None, 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 (one of "jupyter", "glfw", "qt", "ex, a WgpuCanvas, or a pygfx.Texture, optional) – Provides surface on which a scene will be rendered. Can optionally provide a WgpuCanvas instance or a str to force the PlotArea to use a specific canvas from one of the following options: “jupyter”, “glfw”, “qt”. Can also provide a pygfx Texture to render to.

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

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