add_lineΒΆ

Subplot.add_line(data, thickness=2.0, colors='w', alpha=1.0, cmap=None, cmap_values=None, z_position=None, collection_index=None, *args, **kwargs)ΒΆ

Create a line Graphic, 2d or 3d

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

  • thickness (float, optional, default 2.0) – thickness of the line

  • 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

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

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

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

  • z_position (float, optional) – z-axis position for placing the graphic

  • args – passed to Graphic

  • kwargs – passed to Graphic

Return type:

LineGraphic

Features

data: ImageDataFeature

Manages the line [x, y, z] positions data buffer, allows regular and fancy indexing.

colors: ColorFeature

Manages the color buffer, allows regular and fancy indexing.

cmap: CmapFeature

Manages the cmap, wraps ColorFeature to add additional functionality relevant to cmaps.

thickness: ThicknessFeature

Manages the thickness feature of the lines.

present: PresentFeature

Control the presence of the Graphic in the scene, set to True or False