spine.vis.point

Tools to draw 2D or 3D point clouds.

Functions

scatter_points(points[, color, markersize, ...])

Dispatch to the explicit 2D or 3D point-scatter implementation.

scatter_points_2d(points[, color, ...])

Scatter 2D points and their labels.

scatter_points_3d(points[, color, ...])

Scatter 3D points and their labels.

spine.vis.point.scatter_points(points: ndarray, color: bool | int | float | generic | str | Sequence[bool | int | float | generic | str] | ndarray | None = None, markersize: bool | int | float | generic | Sequence[bool | int | float | generic] | ndarray = 2, linewidth: float = 2, colorscale: str | list | None = None, cmin: int | float | None = None, cmax: int | float | None = None, opacity: float | None = None, hovertext: bool | int | float | generic | str | Sequence[bool | int | float | generic | str] | ndarray | None = None, hovertemplate: str | None = None, dim: Literal[2, 3] = 3, mode: str = 'markers', marker: dict[str, Any] | None = None, line: dict[str, Any] | None = None, **kwargs: Any) list[plotly.graph_objs.Scatter] | list[plotly.graph_objs.Scatter3d][source]

Dispatch to the explicit 2D or 3D point-scatter implementation.

Parameters:
  • points (np.ndarray) – (N, 2+) array of point coordinates.

  • color (Union[str, int, float, Sequence], optional) – Color of markers or lines. Can be one shared scalar value or one value per point.

  • markersize (Union[int, float, Sequence], default 2) – Marker size, provided either as one shared numeric value or one value per point.

  • linewidth (float, default 2) – Line width.

  • colorscale (Union[str, list], optional) – Plotly colorscale specifier.

  • cmin (Union[int, float], optional) – Minimum of the color range.

  • cmax (Union[int, float], optional) – Maximum of the color range.

  • opacity (float, optional) – Marker opacity.

  • hovertext (Union[int, float, str, Sequence], optional) – Marker hover labels. Can be one shared label or one label per point.

  • hovertemplate (str, optional) – Plotly hover formatting string.

  • dim (Literal[2, 3], default 3) – Requested display dimension. If points only has two coordinate columns, the 2D implementation is used regardless.

  • mode (str, default "markers") – Plotly drawing mode.

  • marker (dict, optional) – Plotly marker style dictionary.

  • line (dict, optional) – Plotly line style dictionary.

  • **kwargs (Any) – Additional keyword arguments forwarded to the concrete Plotly trace.

Returns:

Single homogeneous trace sequence produced by the 2D or 3D helper.

Return type:

Union[list[go.Scatter], list[go.Scatter3d]]

spine.vis.point.scatter_points_2d(points: ndarray, color: bool | int | float | generic | str | Sequence[bool | int | float | generic | str] | ndarray | None = None, markersize: bool | int | float | generic | Sequence[bool | int | float | generic] | ndarray = 2, linewidth: float = 2, colorscale: str | list | None = None, cmin: int | float | None = None, cmax: int | float | None = None, opacity: float | None = None, hovertext: bool | int | float | generic | str | Sequence[bool | int | float | generic | str] | ndarray | None = None, hovertemplate: str | None = None, mode: str = 'markers', marker: dict[str, Any] | None = None, line: dict[str, Any] | None = None, **kwargs: Any) list[plotly.graph_objs.Scatter][source]

Scatter 2D points and their labels.

Parameters:
  • points (np.ndarray) – (N, 2+) array of point coordinates.

  • color (Union[str, int, float, Sequence], optional) – Color of markers or lines. Can be one shared scalar value or one value per point.

  • markersize (Union[int, float, Sequence], default 2) – Marker size, provided either as one shared numeric value or one value per point.

  • linewidth (float, default 2) – Line width.

  • colorscale (Union[str, list], optional) – Plotly colorscale specifier.

  • cmin (Union[int, float], optional) – Minimum of the color range.

  • cmax (Union[int, float], optional) – Maximum of the color range.

  • opacity (float, optional) – Marker opacity.

  • hovertext (Union[int, float, str, Sequence], optional) – Marker hover labels. Can be one shared label or one label per point.

  • hovertemplate (str, optional) – Plotly hover formatting string.

  • mode (str, default "markers") – Plotly drawing mode.

  • marker (dict, optional) – Plotly marker style dictionary.

  • line (dict, optional) – Plotly line style dictionary.

  • **kwargs (Any) – Additional keyword arguments forwarded to plotly.graph_objs.Scatter.

Returns:

Single 2D scatter trace wrapped in a list.

Return type:

List[go.Scatter]

spine.vis.point.scatter_points_3d(points: ndarray, color: bool | int | float | generic | str | Sequence[bool | int | float | generic | str] | ndarray | None = None, markersize: bool | int | float | generic | Sequence[bool | int | float | generic] | ndarray = 2, linewidth: float = 2, colorscale: str | list | None = None, cmin: int | float | None = None, cmax: int | float | None = None, opacity: float | None = None, hovertext: bool | int | float | generic | str | Sequence[bool | int | float | generic | str] | ndarray | None = None, hovertemplate: str | None = None, mode: str = 'markers', marker: dict[str, Any] | None = None, line: dict[str, Any] | None = None, **kwargs: Any) list[plotly.graph_objs.Scatter3d][source]

Scatter 3D points and their labels.

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

  • color (Union[str, int, float, Sequence], optional) – Color of markers or lines. Can be one shared scalar value or one value per point.

  • markersize (Union[int, float, Sequence], default 2) – Marker size, provided either as one shared numeric value or one value per point.

  • linewidth (float, default 2) – Line width.

  • colorscale (Union[str, list], optional) – Plotly colorscale specifier.

  • cmin (Union[int, float], optional) – Minimum of the color range.

  • cmax (Union[int, float], optional) – Maximum of the color range.

  • opacity (float, optional) – Marker opacity.

  • hovertext (Union[int, float, str, Sequence], optional) – Marker hover labels. Can be one shared label or one label per point.

  • hovertemplate (str, optional) – Plotly hover formatting string.

  • mode (str, default "markers") – Plotly drawing mode.

  • marker (dict, optional) – Plotly marker style dictionary.

  • line (dict, optional) – Plotly line style dictionary.

  • **kwargs (Any) – Additional keyword arguments forwarded to plotly.graph_objs.Scatter3d.

Returns:

Single 3D scatter trace wrapped in a list.

Return type:

List[go.Scatter3d]