plot_habitat_feature_bars

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_bars(data: 'HabitatFeaturePanel' | 'HabitatFeatureComparison', *, features: Sequence[str] | None = None, habitats: Sequence[int] | None = None, subject_id: str | None = None, max_features: int = 6, pair: Tuple[int, int] | None = None, title: str | None = None) → Figure[source]

One bar panel per feature (independent y-axis).

Grouped bars on a shared linear y-axis mix Energy (~1e9) with volume_fraction (0-1) and crush the small-scale features. Faceting keeps the public signature (features=, subject_id=, …) and puts each feature on its own scale. Cohort panels show mean +/- 95% CI; a single subject_id shows that subject’s values (no error bars).

Parameters:
  • data – Panel or comparison.

  • features – Explicit shortlist. Default: top-k by absolute effect or IQR.

  • habitats – Optional habitat subset.

  • subject_id – If set, that subject’s values (no error bars).

  • max_features – Cap when features is omitted.

  • pair – Optional pair used only when ranking by effect size.

  • title – Optional figure title.

Returns:

The matplotlib Figure.