mantispy.pl.metrics

Contents

mantispy.pl.metrics#

mantispy.pl.metrics(table, ax=None)[source]#

Grouped bars of an evaluate_correction() table.

Takes the table instead of an AnnData because the table already holds every representation side by side.

Parameters:
  • table (DataFrame) – A tidy frame with metric, representation and value, as evaluate_correction() returns. Its better column, when present, adds the direction that is an improvement to each tick label.

  • ax (Axes | None (default: None)) – Axes to draw on, or None for a new figure.

Return type:

Axes | None

Returns:

The axes when the caller passed ax, else None because the plot then owns the figure it created. When returned they hold one group of bars per metric and one bar per representation.

Raises:

ValueError – The table holds more than one value for some metric and representation, which cannot be pivoted into a grid.