plot_habitat_clustering_pca_3d_interactive
Note
This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.
- plot_habitat_clustering_pca_3d_interactive(features: np.ndarray, labels: np.ndarray, *, centers: np.ndarray | None = None, title: str | None = None, n_clusters: int | None = None, palette: Sequence[str] | None = None, alpha: float = 0.35, marker_size: int = 20) go.Figure[source]
Interactive 3D PCA scatter using plotly (optional dependency).
- Parameters:
features – Feature matrix, shape
(n_samples, n_features).labels – Habitat assignment per row, shape
(n_samples,).centers – Optional centroid matrix, shape
(n_habitats, n_features).title – Plot title.
n_clusters – Selected cluster count for the default title.
palette – Optional hex colour list.
alpha – Scatter opacity in
[0, 1].marker_size – Plotly marker size scale.
- Returns:
A plotly
Figureready forwrite_html.- Raises:
OptionalDependencyError – When plotly is not installed.