fastplotlib.layouts.ImguiFigure#
- class ImguiFigure(shape=(1, 1), cameras='2d', controller_types=None, controller_ids=None, controllers=None, canvas=None, renderer=None, size=(500, 300), names=None)[source]#
A grid of subplots.
- Parameters:
cameras ("2d", "3", list of "2d" | "3d", Iterable of camera instances, or Iterable of "2d" | "3d", optional) –
if str, one of"2d"
or"3d"
indicating 2D or 3D cameras for all subplotsIterable/list/array of2d
and/or3d
that specifies the camera type for each subplotIterable/list/array of pygfx.PerspectiveCamera instancescontroller_types (str, Iterable, optional) – list/array that specifies the controller type for each subplot. Valid controller types: “panzoom”, “fly”, “trackball”, “orbit”. If not specified a default controller is chosen based on the camera type. Orthographic projections, i.e. “2d” cameras, use a “panzoom” controller by default. Perspective projections with a FOV > 0, i.e. “3d” cameras, use a “fly” controller by default.
controller_ids (str, list of int, np.ndarray of int, or list with sublists of subplot str names, optional) –
If None a unique controller is created for each subplotIf “sync” all the subplots use the same controllerIf array/list it must be reshapeable togrid_shape
.This allows custom assignment of controllers
Example with integers:sync first 2 plots, and sync last 2 plots: [[0, 0, 1], [2, 3, 3]]Example with str subplot names:list of lists of subplot names, each sublist is synced: [[subplot_a, subplot_b, subplot_e], [subplot_c, subplot_d]]this syncs subplot_a, subplot_b and subplot_e together; syncs subplot_c and subplot_d togethercontrollers (pygfx.Controller | list[pygfx.Controller] | np.ndarray[pygfx.Controller], optional) – directly provide pygfx.Controller instances(s). Useful if you want to use a controller from an existing plot/subplot. Other controller kwargs, i.e.
controller_types
andcontroller_ids
are ignored ifcontrollers
are provided.canvas (str, BaseRenderCanvas, pygfx.Texture) – Canvas to draw the figure onto, usually auto-selected based on running environment.
renderer (pygfx.Renderer, optional) – pygfx renderer instance
size ((int, int), optional) – starting size of canvas, default (500, 300)
Examples#
Image widget videos side by side
Line collections quantitative cmap
Line Collection Qualitative Colormap
Iris Scatter Plot Color Slicing
Iris Scatter Plot Data Slicing
LinearRegionSelectors with LineCollection
Electromagnetic Wave Animation