fastplotlib.LineGraphic#

class LineGraphic(data, thickness=2.0, colors='w', uniform_color=False, alpha=1.0, cmap=None, cmap_transform=None, isolated_buffer=True, **kwargs)[source]#

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

  • uniform_color (bool, default False) – if True, uses a uniform buffer for the line color, 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 line instead of assigning colors manually, this overrides any argument passed to “colors”

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

  • **kwargs – passed to Graphic

Examples#

Line Plot Colormap

Line Plot Colormap

Simple Line Plot

Simple Line Plot

Line Plot Data Slicing

Line Plot Data Slicing

Lines more colormapping

Lines more colormapping

Line Plot Color Slicing

Line Plot Color Slicing

Line collection slicing

Line collection slicing

Linear Selectors Image

Linear Selectors Image

LinearRegionSelectors

LinearRegionSelectors

Linear Selectors

Linear Selectors

Simple Line Animation

Simple Line Animation

Simple 3D Line Animation

Simple 3D Line Animation

Lorenz System Animation

Lorenz System Animation