diffsvg.pl.plot_stability#

diffsvg.pl.plot_stability(result, kind='heatmap', metric='spearman', ax=None, figsize=None, cmap='viridis', annotate=True, save_path=None)#

Visualize a diffsvg.tl.check_stability result.

Parameters:
result

A diffsvg.tl.StabilityResult.

kind default: 'heatmap'

"heatmap" (default) draws the run-by-run agreement matrix with a dendrogram above it, so configurations that rank genes the same way cluster together. "sensitivity" draws the one-factor-at-a-time view instead: how far each single parameter change moves the ranking away from the baseline.

metric default: 'spearman'

"spearman" (rank correlation over all genes) or "top_overlap" (fraction of the top result.top_k genes shared). The first is the global view, the second is the decision-relevant one.

ax default: None

Existing axes to draw into; a new figure is created if omitted. For kind="heatmap" the axes is split to make room for the dendrogram, so pass one that can be subdivided (a normal subplot).

figsize default: None

Defaults to something that scales with the number of runs.

cmap default: 'viridis'

Heatmap colormap, and whether to write each cell’s value into it (readable up to roughly a dozen runs).

annotate default: True

Heatmap colormap, and whether to write each cell’s value into it (readable up to roughly a dozen runs).

save_path default: None

If given, save the figure here (dpi=300, bbox_inches="tight").

Returns:

matplotlib.axes.Axes The axes the data was drawn into. Note that for kind="heatmap" this is not the ax that was passed in, since that one is split.