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
. EachFigure
instance will have [n rows, n columns] of subplots.Important
Subplot
is not meant to be constructed directly, it only exists as part of aFigure
- 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’ setsfov = 50
.fov
can be changed at any time.controller (str or pygfx.Controller, optional) –
ifNone
, uses a PanZoomController for “2d” camera or FlyController for “3d” camera.ifstr
, must be one of: “panzoom”, “fly”, “trackball”, or “orbit”.also accepts a pygfx.Controller instancecanvas (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#
LinearRegionSelectors with LineCollection