clvkit.plotting.plot_cohort_matrix#
- plot_cohort_matrix(matrix, *, ax=None, relative=True, cmap='viridis', annotate=True, colorbar=True, **kwargs)[source]#
Draw a cohort matrix as the standard triangular heatmap.
Unobserved cells — the periods a young cohort hasn’t lived through yet — are drawn in flat grey and left unlabelled, so the eye never reads them as a cohort that dropped to zero.
- Parameters:
matrix (CohortMatrix)
ax (Axes | None)
relative (bool)
cmap (str)
annotate (bool)
colorbar (bool)
- Return type:
Axes