add_scatter#

Subplot.add_scatter(data, colors='w', uniform_color=False, alpha=1.0, cmap=None, cmap_transform=None, isolated_buffer=True, sizes=1, uniform_size=False, **kwargs)#

Create a Scatter Graphic, 2d or 3d

Parameters:
  • data (array-like) – Scatter data to plot, 2D must be of shape [n_points, 2], 3D must be of shape [n_points, 3]

  • colors (str, array, or iterable, default "w") – specify colors as a single human readable string, a single RGBA array, or an iterable of strings or RGBA arrays

  • uniform_color (bool, default False) – if True, uses a uniform buffer for the scatter point colors, basically saves GPU VRAM when the entire line has a single color

  • alpha (float, optional, default 1.0) – alpha value for the colors

  • cmap (str, optional) – apply a colormap to the scatter instead of assigning colors manually, this overrides any argument passed to “colors”

  • cmap_transform (1D array-like or list of numerical values, optional) – if provided, these values are used to map the colors from the cmap

  • isolated_buffer (bool, default True) – whether the buffers should be isolated from the user input array. Generally always True, False is for rare advanced use.

  • sizes (float or iterable of float, optional, default 1.0) – size of the scatter points

  • uniform_size (bool, default False) – if True, uses a uniform buffer for the scatter point sizes, basically saves GPU VRAM when all scatter points are the same size

  • kwargs – passed to Graphic

Return type:

ScatterGraphic

Examples#

Scatter Animation Data

Scatter Animation Data

Scatter Animation Colors

Scatter Animation Colors