spine.vis.arrow

Module to draw 3D arrows.

Functions

scatter_arrows(points, directions[, length, ...])

Converts a list of points and directions into a set of arrows.

spine.vis.arrow.scatter_arrows(points: np.ndarray, directions: np.ndarray, length: float = 10.0, tip_ratio: float = 0.25, color: ColorInput = None, hovertext: HoverTextInput = None, line: dict[str, Any] | None = None, linewidth: float = 5, name: str | None = None) list[go.Scatter3d | go.Cone][source]

Converts a list of points and directions into a set of arrows.

Parameters:
  • points (np.ndarray) – (N, 3) Array of point coordinates

  • directions (np.ndarray) – (N, 3) Array of arrow direction vectors

  • length (float, default 5.0) – Length of the arrows

  • tip_ratio (float, defautl 0.05) – Relative arrow tip size w.r.t. its full length

  • color (Union[str, int, float, Sequence], optional) – Color of the arrows, either as one shared scalar value or one value per arrow.

  • hovertext (Union[int, float, str, Sequence], optional) – Text associated with the arrows, either as one shared label or one label per arrow.

  • line (dict, optional) – Arrow trunk line property dictionary

  • linewidth (float, default 2) – Width of the arrow trunk lines

  • name (name) – Name of the traces