plot_ith_summary

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_ith_summary(ith: float, *, dispersion: Mapping[int, float] | None = None, per_habitat: Mapping[int, Any] | None = None, title: str | None = None, bar_width: float | None = None) → Figure[source]

One-panel bar chart: global ITH, then optional per-habitat ITH.

The first bar is the global score (tick ITH, Okabe–Ito reddish purple, palette index 3). When dispersion is given, a visual gap separates it from H1/H2/… bars (bluish green, palette index 2) on the same 0–1 axis (ylabel ITH). The global score is the volume-weighted mean of those per-habitat values d_i = 1 - (S_i,max / n_i) / S_i. Without dispersion the figure is still one panel with a single ITH category — not a stacked number-plus-gauge.

Parameters:
  • ith – Scalar ITH in [0, 1).

  • dispersion – Optional habitat id → per-habitat ITH. Prefer habitat_ith_dispersion().

  • per_habitat – Deprecated alias of dispersion. The old id → (num_regions, largest_size) mapping is rejected.

  • title – Optional figure title. Default is ITH summary.

  • bar_width – Optional bar width in category-slot units. Defaults to the same width as plot_habitat_volume_fractions().

Returns:

A matplotlib Figure.

Examples using habit.viz.plot_ith_summary

Quickstart: Python API

Quickstart: Python API