Skip to content

Built-in Plots

Performance Plots

AverageRuntimePlot

Bases: BarPlot

Bar chart showing average runtime per algorithm.

Examples:

>>> bench.add_metric(name="runtime", metric=Runtime())
>>> bench.add_plot(name="avg_runtime", plot=AverageRuntimePlot())

run(benchmark_results: BenchmarkResultContainer) -> None

Generate plot output from benchmark results.

Parameters:

setup_figure() -> None

Create a matplotlib figure.

finalize_plot(xlabel: str, ylabel: str, title: str, ylim: tuple[float, float] | None = None, x_rotation: int = 45) -> None

Apply common axis labels, title, limits, and display behavior.

Parameters:

  • xlabel (str) –

    Label for the x-axis.

  • ylabel (str) –

    Label for the y-axis.

  • title (str) –

    Plot title.

  • ylim (tuple[float, float] | None, default: None ) –

    Lower and upper y-axis limits, by default None.

  • x_rotation (int, default: 45 ) –

    Rotation angle for x-axis tick labels, by default 45.

create(*, rows: list[dict[str, Any]], xlabel: str, ylabel: str, title: str, x: str = 'x', y: str = 'y', aggregation: Aggregation = Aggregation.MEAN, hue: str | None = None, hline: float | None = None, hline_label: str | None = None, ylim: tuple[float, float] | None = None, legend: bool = False) -> None

Create a bar plot from row-oriented data.

Parameters:

  • rows (dict[str, Any]) –

    Row-oriented mapping used to construct the plotting DataFrame.

  • xlabel (str) –

    Label for the x-axis.

  • ylabel (str) –

    Label for the y-axis.

  • title (str) –

    Plot title.

  • x (str, default: 'x' ) –

    Column name mapped to the x-axis, by default "x".

  • y (str, default: 'y' ) –

    Column name mapped to the y-axis, by default "y".

  • aggregation (Aggregation, default: MEAN ) –

    Aggregation strategy applied by seaborn, by default Aggregation.MEAN.

  • hue (str | None, default: None ) –

    Optional grouping column for grouped bars, by default None.

  • hline (float | None, default: None ) –

    Optional horizontal reference line value, by default None.

  • hline_label (str | None, default: None ) –

    Legend label for the horizontal reference line, by default None.

  • ylim (tuple[float, float] | None, default: None ) –

    Lower and upper y-axis limits, by default None.

  • legend (bool, default: False ) –

    Whether seaborn should create a legend for hue groups, by default False.

AverageApproximationRatioPlot

Bases: BarPlot

Bar chart showing average approximation ratio per algorithm.

Examples:

>>> bench.add_metric(name="approx_ratio", metric=ApproximationRatio())
>>> bench.add_plot(name="avg_approx", plot=AverageApproximationRatioPlot())

run(benchmark_results: BenchmarkResultContainer) -> None

Generate plot output from benchmark results.

Parameters:

setup_figure() -> None

Create a matplotlib figure.

finalize_plot(xlabel: str, ylabel: str, title: str, ylim: tuple[float, float] | None = None, x_rotation: int = 45) -> None

Apply common axis labels, title, limits, and display behavior.

Parameters:

  • xlabel (str) –

    Label for the x-axis.

  • ylabel (str) –

    Label for the y-axis.

  • title (str) –

    Plot title.

  • ylim (tuple[float, float] | None, default: None ) –

    Lower and upper y-axis limits, by default None.

  • x_rotation (int, default: 45 ) –

    Rotation angle for x-axis tick labels, by default 45.

create(*, rows: list[dict[str, Any]], xlabel: str, ylabel: str, title: str, x: str = 'x', y: str = 'y', aggregation: Aggregation = Aggregation.MEAN, hue: str | None = None, hline: float | None = None, hline_label: str | None = None, ylim: tuple[float, float] | None = None, legend: bool = False) -> None

Create a bar plot from row-oriented data.

Parameters:

  • rows (dict[str, Any]) –

    Row-oriented mapping used to construct the plotting DataFrame.

  • xlabel (str) –

    Label for the x-axis.

  • ylabel (str) –

    Label for the y-axis.

  • title (str) –

    Plot title.

  • x (str, default: 'x' ) –

    Column name mapped to the x-axis, by default "x".

  • y (str, default: 'y' ) –

    Column name mapped to the y-axis, by default "y".

  • aggregation (Aggregation, default: MEAN ) –

    Aggregation strategy applied by seaborn, by default Aggregation.MEAN.

  • hue (str | None, default: None ) –

    Optional grouping column for grouped bars, by default None.

  • hline (float | None, default: None ) –

    Optional horizontal reference line value, by default None.

  • hline_label (str | None, default: None ) –

    Legend label for the horizontal reference line, by default None.

  • ylim (tuple[float, float] | None, default: None ) –

    Lower and upper y-axis limits, by default None.

  • legend (bool, default: False ) –

    Whether seaborn should create a legend for hue groups, by default False.

AverageFeasibilityRatioPlot

Bases: BarPlot

Bar chart showing average feasibility ratio per algorithm.

Examples:

>>> bench.add_metric(name="feasibility", metric=FeasibilityRatio())
>>> bench.add_plot(name="avg_feasibility", plot=AverageFeasibilityRatioPlot())

run(benchmark_results: BenchmarkResultContainer) -> None

Generate plot output from benchmark results.

Parameters:

setup_figure() -> None

Create a matplotlib figure.

finalize_plot(xlabel: str, ylabel: str, title: str, ylim: tuple[float, float] | None = None, x_rotation: int = 45) -> None

Apply common axis labels, title, limits, and display behavior.

Parameters:

  • xlabel (str) –

    Label for the x-axis.

  • ylabel (str) –

    Label for the y-axis.

  • title (str) –

    Plot title.

  • ylim (tuple[float, float] | None, default: None ) –

    Lower and upper y-axis limits, by default None.

  • x_rotation (int, default: 45 ) –

    Rotation angle for x-axis tick labels, by default 45.

create(*, rows: list[dict[str, Any]], xlabel: str, ylabel: str, title: str, x: str = 'x', y: str = 'y', aggregation: Aggregation = Aggregation.MEAN, hue: str | None = None, hline: float | None = None, hline_label: str | None = None, ylim: tuple[float, float] | None = None, legend: bool = False) -> None

Create a bar plot from row-oriented data.

Parameters:

  • rows (dict[str, Any]) –

    Row-oriented mapping used to construct the plotting DataFrame.

  • xlabel (str) –

    Label for the x-axis.

  • ylabel (str) –

    Label for the y-axis.

  • title (str) –

    Plot title.

  • x (str, default: 'x' ) –

    Column name mapped to the x-axis, by default "x".

  • y (str, default: 'y' ) –

    Column name mapped to the y-axis, by default "y".

  • aggregation (Aggregation, default: MEAN ) –

    Aggregation strategy applied by seaborn, by default Aggregation.MEAN.

  • hue (str | None, default: None ) –

    Optional grouping column for grouped bars, by default None.

  • hline (float | None, default: None ) –

    Optional horizontal reference line value, by default None.

  • hline_label (str | None, default: None ) –

    Legend label for the horizontal reference line, by default None.

  • ylim (tuple[float, float] | None, default: None ) –

    Lower and upper y-axis limits, by default None.

  • legend (bool, default: False ) –

    Whether seaborn should create a legend for hue groups, by default False.

AverageBestSolutionFoundRatioPlot

Bases: BarPlot

Bar chart showing average best solution found ratio per algorithm.

Examples:

>>> bench.add_metric(name="best_found", metric=FractionOfOverallBestSolution())
>>> bench.add_plot(name="avg_best", plot=AverageBestSolutionFoundRatioPlot())

run(benchmark_results: BenchmarkResultContainer) -> None

Generate plot output from benchmark results.

Parameters:

setup_figure() -> None

Create a matplotlib figure.

finalize_plot(xlabel: str, ylabel: str, title: str, ylim: tuple[float, float] | None = None, x_rotation: int = 45) -> None

Apply common axis labels, title, limits, and display behavior.

Parameters:

  • xlabel (str) –

    Label for the x-axis.

  • ylabel (str) –

    Label for the y-axis.

  • title (str) –

    Plot title.

  • ylim (tuple[float, float] | None, default: None ) –

    Lower and upper y-axis limits, by default None.

  • x_rotation (int, default: 45 ) –

    Rotation angle for x-axis tick labels, by default 45.

create(*, rows: list[dict[str, Any]], xlabel: str, ylabel: str, title: str, x: str = 'x', y: str = 'y', aggregation: Aggregation = Aggregation.MEAN, hue: str | None = None, hline: float | None = None, hline_label: str | None = None, ylim: tuple[float, float] | None = None, legend: bool = False) -> None

Create a bar plot from row-oriented data.

Parameters:

  • rows (dict[str, Any]) –

    Row-oriented mapping used to construct the plotting DataFrame.

  • xlabel (str) –

    Label for the x-axis.

  • ylabel (str) –

    Label for the y-axis.

  • title (str) –

    Plot title.

  • x (str, default: 'x' ) –

    Column name mapped to the x-axis, by default "x".

  • y (str, default: 'y' ) –

    Column name mapped to the y-axis, by default "y".

  • aggregation (Aggregation, default: MEAN ) –

    Aggregation strategy applied by seaborn, by default Aggregation.MEAN.

  • hue (str | None, default: None ) –

    Optional grouping column for grouped bars, by default None.

  • hline (float | None, default: None ) –

    Optional horizontal reference line value, by default None.

  • hline_label (str | None, default: None ) –

    Legend label for the horizontal reference line, by default None.

  • ylim (tuple[float, float] | None, default: None ) –

    Lower and upper y-axis limits, by default None.

  • legend (bool, default: False ) –

    Whether seaborn should create a legend for hue groups, by default False.

AverageFoBRatioPlot

Bases: BarPlot

Bar chart showing average fraction of overall best per algorithm.

Examples:

>>> bench.add_metric(name="fob", metric=FractionOfOverallBestSolution())
>>> bench.add_plot(name="avg_fob", plot=AverageFoBRatioPlot())

run(benchmark_results: BenchmarkResultContainer) -> None

Generate plot output from benchmark results.

Parameters:

setup_figure() -> None

Create a matplotlib figure.

finalize_plot(xlabel: str, ylabel: str, title: str, ylim: tuple[float, float] | None = None, x_rotation: int = 45) -> None

Apply common axis labels, title, limits, and display behavior.

Parameters:

  • xlabel (str) –

    Label for the x-axis.

  • ylabel (str) –

    Label for the y-axis.

  • title (str) –

    Plot title.

  • ylim (tuple[float, float] | None, default: None ) –

    Lower and upper y-axis limits, by default None.

  • x_rotation (int, default: 45 ) –

    Rotation angle for x-axis tick labels, by default 45.

create(*, rows: list[dict[str, Any]], xlabel: str, ylabel: str, title: str, x: str = 'x', y: str = 'y', aggregation: Aggregation = Aggregation.MEAN, hue: str | None = None, hline: float | None = None, hline_label: str | None = None, ylim: tuple[float, float] | None = None, legend: bool = False) -> None

Create a bar plot from row-oriented data.

Parameters:

  • rows (dict[str, Any]) –

    Row-oriented mapping used to construct the plotting DataFrame.

  • xlabel (str) –

    Label for the x-axis.

  • ylabel (str) –

    Label for the y-axis.

  • title (str) –

    Plot title.

  • x (str, default: 'x' ) –

    Column name mapped to the x-axis, by default "x".

  • y (str, default: 'y' ) –

    Column name mapped to the y-axis, by default "y".

  • aggregation (Aggregation, default: MEAN ) –

    Aggregation strategy applied by seaborn, by default Aggregation.MEAN.

  • hue (str | None, default: None ) –

    Optional grouping column for grouped bars, by default None.

  • hline (float | None, default: None ) –

    Optional horizontal reference line value, by default None.

  • hline_label (str | None, default: None ) –

    Legend label for the horizontal reference line, by default None.

  • ylim (tuple[float, float] | None, default: None ) –

    Lower and upper y-axis limits, by default None.

  • legend (bool, default: False ) –

    Whether seaborn should create a legend for hue groups, by default False.

RuntimePerModelPlot

Bases: BarPlot

Bar chart showing runtime per model grouped by algorithm.

Examples:

>>> bench.add_metric(name="runtime", metric=Runtime())
>>> bench.add_plot(name="runtime_per_model", plot=RuntimePerModelPlot())

run(benchmark_results: BenchmarkResultContainer) -> None

Generate plot output from benchmark results.

Parameters:

setup_figure() -> None

Create a matplotlib figure.

finalize_plot(xlabel: str, ylabel: str, title: str, ylim: tuple[float, float] | None = None, x_rotation: int = 45) -> None

Apply common axis labels, title, limits, and display behavior.

Parameters:

  • xlabel (str) –

    Label for the x-axis.

  • ylabel (str) –

    Label for the y-axis.

  • title (str) –

    Plot title.

  • ylim (tuple[float, float] | None, default: None ) –

    Lower and upper y-axis limits, by default None.

  • x_rotation (int, default: 45 ) –

    Rotation angle for x-axis tick labels, by default 45.

create(*, rows: list[dict[str, Any]], xlabel: str, ylabel: str, title: str, x: str = 'x', y: str = 'y', aggregation: Aggregation = Aggregation.MEAN, hue: str | None = None, hline: float | None = None, hline_label: str | None = None, ylim: tuple[float, float] | None = None, legend: bool = False) -> None

Create a bar plot from row-oriented data.

Parameters:

  • rows (dict[str, Any]) –

    Row-oriented mapping used to construct the plotting DataFrame.

  • xlabel (str) –

    Label for the x-axis.

  • ylabel (str) –

    Label for the y-axis.

  • title (str) –

    Plot title.

  • x (str, default: 'x' ) –

    Column name mapped to the x-axis, by default "x".

  • y (str, default: 'y' ) –

    Column name mapped to the y-axis, by default "y".

  • aggregation (Aggregation, default: MEAN ) –

    Aggregation strategy applied by seaborn, by default Aggregation.MEAN.

  • hue (str | None, default: None ) –

    Optional grouping column for grouped bars, by default None.

  • hline (float | None, default: None ) –

    Optional horizontal reference line value, by default None.

  • hline_label (str | None, default: None ) –

    Legend label for the horizontal reference line, by default None.

  • ylim (tuple[float, float] | None, default: None ) –

    Lower and upper y-axis limits, by default None.

  • legend (bool, default: False ) –

    Whether seaborn should create a legend for hue groups, by default False.

Analysis Plots

ApproximationRatioVsVarNumberPlot

Bases: ScatterPlot

Scatter plot showing an approximation ratio vs. number of variables per model/algorithm.

Examples:

>>> bench.add_feature(name="var_count", feature=VarNumberFeature())
>>> bench.add_metric(name="approx_ratio", metric=ApproximationRatio())
>>> bench.add_plot(name="approx_vs_vars", plot=ApproximationRatioVsVarNumberPlot())

run(benchmark_results: BenchmarkResultContainer) -> None

Generate plot output from benchmark results.

Parameters:

setup_figure() -> None

Create a matplotlib figure.

finalize_plot(xlabel: str, ylabel: str, title: str, ylim: tuple[float, float] | None = None, x_rotation: int = 45) -> None

Apply common axis labels, title, limits, and display behavior.

Parameters:

  • xlabel (str) –

    Label for the x-axis.

  • ylabel (str) –

    Label for the y-axis.

  • title (str) –

    Plot title.

  • ylim (tuple[float, float] | None, default: None ) –

    Lower and upper y-axis limits, by default None.

  • x_rotation (int, default: 45 ) –

    Rotation angle for x-axis tick labels, by default 45.

create(*, rows: list[dict[str, Any]], xlabel: str, ylabel: str, title: str, hue: str, x: str = 'x', y: str = 'y', hline: float | None = None, hline_label: str | None = None, hcolor: str = AqariosColours.SUCCESS) -> None

Create a scatter plot from row-oriented data.

Parameters:

  • rows (dict[str, Any]) –

    Row-oriented mapping used to construct the plotting DataFrame.

  • xlabel (str) –

    Label for the x-axis.

  • ylabel (str) –

    Label for the y-axis.

  • title (str) –

    Plot title.

  • hue (str) –

    Column used to color points by group.

  • x (str, default: 'x' ) –

    Column name mapped to the x-axis, by default "x".

  • y (str, default: 'y' ) –

    Column name mapped to the y-axis, by default "y".

  • hline (float | None, default: None ) –

    Optional horizontal reference line value, by default None.

  • hline_label (str | None, default: None ) –

    Legend label for the horizontal reference line, by default None.

  • hcolor (str, default: SUCCESS ) –

    Color of the horizontal reference line, by default AqariosColours.SUCCESS.

FeasibilityRatioVsVarNumberPlot

Bases: ScatterPlot

Scatter plot showing feasibility ratio vs number of variables per model/algorithm.

Examples:

>>> bench.add_feature(name="var_count", feature=VarNumberFeature())
>>> bench.add_metric(name="feasibility", metric=FeasibilityRatio())
>>> bench.add_plot(name="feasibility_vs_vars", plot=FeasibilityRatioVsVarNumberPlot())

run(benchmark_results: BenchmarkResultContainer) -> None

Generate plot output from benchmark results.

Parameters:

setup_figure() -> None

Create a matplotlib figure.

finalize_plot(xlabel: str, ylabel: str, title: str, ylim: tuple[float, float] | None = None, x_rotation: int = 45) -> None

Apply common axis labels, title, limits, and display behavior.

Parameters:

  • xlabel (str) –

    Label for the x-axis.

  • ylabel (str) –

    Label for the y-axis.

  • title (str) –

    Plot title.

  • ylim (tuple[float, float] | None, default: None ) –

    Lower and upper y-axis limits, by default None.

  • x_rotation (int, default: 45 ) –

    Rotation angle for x-axis tick labels, by default 45.

create(*, rows: list[dict[str, Any]], xlabel: str, ylabel: str, title: str, hue: str, x: str = 'x', y: str = 'y', hline: float | None = None, hline_label: str | None = None, hcolor: str = AqariosColours.SUCCESS) -> None

Create a scatter plot from row-oriented data.

Parameters:

  • rows (dict[str, Any]) –

    Row-oriented mapping used to construct the plotting DataFrame.

  • xlabel (str) –

    Label for the x-axis.

  • ylabel (str) –

    Label for the y-axis.

  • title (str) –

    Plot title.

  • hue (str) –

    Column used to color points by group.

  • x (str, default: 'x' ) –

    Column name mapped to the x-axis, by default "x".

  • y (str, default: 'y' ) –

    Column name mapped to the y-axis, by default "y".

  • hline (float | None, default: None ) –

    Optional horizontal reference line value, by default None.

  • hline_label (str | None, default: None ) –

    Legend label for the horizontal reference line, by default None.

  • hcolor (str, default: SUCCESS ) –

    Color of the horizontal reference line, by default AqariosColours.SUCCESS.

RuntimeVsVarNumberPlot

Bases: ScatterPlot

Scatter plot showing runtime vs number of variables per model/algorithm.

Examples:

>>> bench.add_feature(name="var_count", feature=VarNumberFeature())
>>> bench.add_metric(name="runtime", metric=Runtime())
>>> bench.add_plot(name="runtime_vs_vars", plot=RuntimeVsVarNumberPlot())

run(benchmark_results: BenchmarkResultContainer) -> None

Generate plot output from benchmark results.

Parameters:

setup_figure() -> None

Create a matplotlib figure.

finalize_plot(xlabel: str, ylabel: str, title: str, ylim: tuple[float, float] | None = None, x_rotation: int = 45) -> None

Apply common axis labels, title, limits, and display behavior.

Parameters:

  • xlabel (str) –

    Label for the x-axis.

  • ylabel (str) –

    Label for the y-axis.

  • title (str) –

    Plot title.

  • ylim (tuple[float, float] | None, default: None ) –

    Lower and upper y-axis limits, by default None.

  • x_rotation (int, default: 45 ) –

    Rotation angle for x-axis tick labels, by default 45.

create(*, rows: list[dict[str, Any]], xlabel: str, ylabel: str, title: str, hue: str, x: str = 'x', y: str = 'y', hline: float | None = None, hline_label: str | None = None, hcolor: str = AqariosColours.SUCCESS) -> None

Create a scatter plot from row-oriented data.

Parameters:

  • rows (dict[str, Any]) –

    Row-oriented mapping used to construct the plotting DataFrame.

  • xlabel (str) –

    Label for the x-axis.

  • ylabel (str) –

    Label for the y-axis.

  • title (str) –

    Plot title.

  • hue (str) –

    Column used to color points by group.

  • x (str, default: 'x' ) –

    Column name mapped to the x-axis, by default "x".

  • y (str, default: 'y' ) –

    Column name mapped to the y-axis, by default "y".

  • hline (float | None, default: None ) –

    Optional horizontal reference line value, by default None.

  • hline_label (str | None, default: None ) –

    Legend label for the horizontal reference line, by default None.

  • hcolor (str, default: SUCCESS ) –

    Color of the horizontal reference line, by default AqariosColours.SUCCESS.

Property Plots

VarNumberBarChartPlot

Bases: BarPlot

Bar chart showing the number of variables per model.

Examples:

>>> bench.add_feature(name="var_count", feature=VarNumberFeature())
>>> bench.add_plot(name="var_number", plot=VarNumberBarChartPlot())

run(benchmark_results: BenchmarkResultContainer) -> None

Generate plot output from benchmark results.

Parameters:

setup_figure() -> None

Create a matplotlib figure.

finalize_plot(xlabel: str, ylabel: str, title: str, ylim: tuple[float, float] | None = None, x_rotation: int = 45) -> None

Apply common axis labels, title, limits, and display behavior.

Parameters:

  • xlabel (str) –

    Label for the x-axis.

  • ylabel (str) –

    Label for the y-axis.

  • title (str) –

    Plot title.

  • ylim (tuple[float, float] | None, default: None ) –

    Lower and upper y-axis limits, by default None.

  • x_rotation (int, default: 45 ) –

    Rotation angle for x-axis tick labels, by default 45.

create(*, rows: list[dict[str, Any]], xlabel: str, ylabel: str, title: str, x: str = 'x', y: str = 'y', aggregation: Aggregation = Aggregation.MEAN, hue: str | None = None, hline: float | None = None, hline_label: str | None = None, ylim: tuple[float, float] | None = None, legend: bool = False) -> None

Create a bar plot from row-oriented data.

Parameters:

  • rows (dict[str, Any]) –

    Row-oriented mapping used to construct the plotting DataFrame.

  • xlabel (str) –

    Label for the x-axis.

  • ylabel (str) –

    Label for the y-axis.

  • title (str) –

    Plot title.

  • x (str, default: 'x' ) –

    Column name mapped to the x-axis, by default "x".

  • y (str, default: 'y' ) –

    Column name mapped to the y-axis, by default "y".

  • aggregation (Aggregation, default: MEAN ) –

    Aggregation strategy applied by seaborn, by default Aggregation.MEAN.

  • hue (str | None, default: None ) –

    Optional grouping column for grouped bars, by default None.

  • hline (float | None, default: None ) –

    Optional horizontal reference line value, by default None.

  • hline_label (str | None, default: None ) –

    Legend label for the horizontal reference line, by default None.

  • ylim (tuple[float, float] | None, default: None ) –

    Lower and upper y-axis limits, by default None.

  • legend (bool, default: False ) –

    Whether seaborn should create a legend for hue groups, by default False.