add_inf_line#

Subplot.add_inf_line(data, axis=None, thickness=2.0, colors='w', cmap=None, cmap_transform=None, cmap_range=None, start_is_infinite=True, end_is_infinite=True, dash_pattern=(), size_space='screen', **kwargs)#

Create a collection of infinite lines.

Parameters:
  • data (array-like) – The line positions. If axis is “x”, “y”, or “z”, a 1D array of positions along that axis; one infinite line is drawn at each position. If axis is None, data is used directly as the segment endpoints, of shape [n_points, 2 | 3], where every two consecutive points define one line.

  • axis ("x", "y", "z", or None, default None) – The axis along which the line positions are given. If None, data is interpreted directly as the segment endpoints.

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

  • colors (ColorLike or MultiColorLike, default "w") – specify colors as a single human-readable string, a single RGBA array, or a Sequence (array, tuple, or list) of strings or RGBA arrays. A sequence of colors provides one color per line.

  • cmap (str, optional) – Apply a colormap to the lines instead of assigning colors manually, one color per line. This overrides any argument passed to “colors”. For supported colormaps see the cmap library catalogue: https://cmap-docs.readthedocs.io/en/stable/catalog/

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

  • cmap_range ((float, float), optional) – the (min, max) of the cmap_transform mapped onto the colormap, defaults to the transform’s own range

  • start_is_infinite (bool, default True) – whether the start of each line is extended to infinity

  • end_is_infinite (bool, default True) – whether the end of each line is extended to infinity

  • dash_pattern (str, tuple, or list, default ()) – The dash pattern. May be a matplotlib-style string, one of "-", "--", "-.", ":" or "solid", "dashed", "dashdot", "dotted", or a sequence of floats describing the length of strokes and gaps.

  • size_space (str, default "screen") – coordinate space in which the thickness is expressed (“screen”, “world”, “model”)

  • **kwargs – passed to Graphic

Return type:

Graphic