fastplotlib.LineStackΒΆ
- class LineStack(data, z_offset=None, thickness=2.0, colors='w', alpha=1.0, cmap=None, cmap_values=None, name=None, metadata=None, separation=10.0, separation_axis='y', *args, **kwargs)[source]ΒΆ
Create a stack of
LineGraphic
that are separated along the βxβ or βyβ axis.- Parameters:
data (list of array-like or array) β List of line data to plot, each element must be a 1D, 2D, or 3D numpy array if elements are 2D, interpreted as [y_vals, n_lines]
z_offset (Iterable of float or float, optional) β
iffloat
, single offset will be used for all linesiflist
offloat
, each value will apply to the individual linesthickness (float or Iterable of float, default 2.0) β
iffloat
, single thickness will be used for all linesiflist
offloat
, each value will apply to the individual linescolors (str, RGBA array, Iterable of RGBA array, or Iterable of str, default "w") β
if singlestr
such as βwβ, βrβ, βbβ, etc, represents a single color for all linesif singleRGBA array
(tuple or list of size 4), represents a single color for all linesiflist
ofstr
, represents color for each individual line, example [βwβ, βbβ, βrβ,β¦]ifRGBA array
of shape [data_size, 4], represents a single RGBA array for each linecmap (Iterable of str or str, optional) β
ifstr
, single cmap will be used for all linesiflist
ofstr
, each cmap will apply to the individual linesNote
cmap
overrides any arguments passed tocolors
cmap_values (1D array-like or Iterable of numerical values, optional) β if provided, these values are used to map the colors from the cmap
metadata (Iterable or array) β metadata associated with this collection, this is for the user to manage.
len(metadata)
must be same aslen(data)
separation (float, default 10) β space in between each line graphic in the stack
separation_axis (str, default "y") β axis in which the line graphics in the stack should be separated
name (str, optional) β name of the line stack
kwargs β passed to LineCollection
Features
Collections support the same features as the underlying graphic. You just have to slice the selection.
See
LineGraphic
details on the features.