fastplotlib.GraphicCollection#

class GraphicCollection(data, **kwargs)[source]#

A collection of graphics of the same type.

Subclasses set only _child_type. Each feature of the child graphic is then exposed as a property returning an accessor that gets and sets that feature across all of the graphics using numpy broadcasting, e.g. collection.colors[:10, 30:50] = "r". Features the collection also owns as a Graphic (name, offset, rotation, scale, alpha, alpha_mode, visible, metadata) are exposed under a plural name (names, offsets, …). The constructor signature is derived from the child graphic as well.

Create a collection of graphics of the same type.

Parameters:
  • data (list of array-like) – one entry per graphic; its length is the number of graphics in the collection

  • **kwargs – any feature of the child graphic (colors, thickness, sizes, …), each accepting one value for all graphics or one value per graphic. A Graphic argument (name, offset, visible, …) sets it on the collection itself, its plural form (names, offsets, visibles, …) sets it per graphic. Any argument that is not a feature is passed unchanged to every child graphic.

Examples#

NDWidget Spike Raster

NDWidget Spike Raster