plot_habitat_feature_violin
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_feature_violin(data: 'HabitatFeaturePanel' | 'HabitatFeatureComparison', *, features: Sequence[str] | None = None, habitats: Sequence[int] | None = None, max_features: int = 6, pair: Tuple[int, int] | None = None, title: str | None = None) Figure[source]
Grouped violins (or box + strip when n is small) for a feature shortlist.
Do not pass hundreds of features – select them, or let
max_featurestake the top-k by absolute effect. A single-subject panel is drawn as points. When any habitat in a panel has fewer than 5 points, that panel uses a box + strip instead of a KDE violin.- Parameters:
data – Panel or comparison.
features – Explicit shortlist. Default: top-k by absolute effect or IQR.
habitats – Optional habitat subset.
max_features – Cap when
featuresis omitted.pair – Optional pair used only when ranking by effect size.
title – Optional figure title.
- Returns:
The matplotlib
Figure.