plot_pareto_radar
site.SiteSolutionSet.plot_pareto_radar(
id_col='solution_rank',
name_col=None,
diff_against=None,
interactive=False,
initially_shown='all',
legend_wrap_at=None,
scale_to='all',
figsize=(9, 7),
theme='whitegrid',
other_color='lightgray',
palette='tab10',
show_dominated=False,
fill=True,
show_value_labels=False,
title=None,
caption=None,
ax=None,
)Plot every Pareto-optimal solution as a shape on a radar (spider) chart, one spoke per metric, each rescaled so further from the centre always means “better” regardless of whether the underlying metric is minimised, maximised, or has a target value.
This shows the same data as plot_pareto_summary(), with the axes wrapped into a circle instead of laid side by side. That’s analytically no better (arguably worse), but the “bigger shape = doing well” reading is often easier for stakeholders to pick up than a parallel coordinates plot.
Area is not a fair overall score. A shape’s area depends on which metrics sit next to each other: reordering the metrics passed to compute_pareto_front() can change which option looks biggest without any value changing. Compare options spoke by spoke. The default caption says so.
Needs at least 3 metrics. With fewer, use plot_pareto_summary().
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| id_col | str | As in plot_pareto_summary(). |
'solution_rank' |
| name_col | str | As in plot_pareto_summary(). |
'solution_rank' |
| diff_against | str | As in plot_pareto_summary(). |
'solution_rank' |
| interactive | bool | If True, returns an interactive Plotly figure: hover a point for its raw value and rank, click a legend entry to hide that option, or double-click one to show it alone. | False |
| initially_shown | "all", "first" or list of ids | Which options are visible when an interactive figure first opens. The rest start greyed out in the legend, one click from being shown – useful when a large front makes the full overlay a tangle. “all” shows every option, “first” only the first option in the legend (the best-ranked Pareto-optimal one), and a list, tuple or set picks specific options by their id_col value (e.g. [1, 17]), even when name_col is set. Ignored if interactive=False, though an invalid value still raises. |
"all" |
| legend_wrap_at | int | Wrap legend labels onto multiple lines at this many characters. None (the default) leaves them on one line. Worth setting when diff_against makes labels long, since a wide legend squeezes the chart. Only the legend wraps: the interactive hover title keeps the full label on one line. |
None |
| scale_to | ('all', 'pareto_front') | Which options each spoke’s best and worst values are taken from, and so what the outer ring and centre mean. “all” scales over every option compared, dominated ones included, so the chart shows how good the front is against everything that was evaluated. “pareto_front” scales over just the Pareto-optimal options, which stretches them across the whole spoke and makes the differences between them easier to see, at the cost of saying nothing about how they compare with the rest. The spoke labels, hover ranks and caption name whichever is used. With “pareto_front”, dominated outlines (show_dominated=True) can fall outside the chart and are clipped to its edge. |
"all" |
| figsize | tuple | Passed to plt.subplots() if ax is not supplied. Ignored if interactive=True. |
(9, 7) |
| theme | str | Seaborn style. Ignored if interactive=True. |
"whitegrid" |
| other_color | str | Colour of the dominated solutions when show_dominated=True. |
"lightgray" |
| palette | str | As in plot_pareto_summary(). |
"tab10" |
| show_dominated | bool | If True, also draw every dominated solution as a thin background outline. Off by default, unlike plot_pareto_summary(): a brute-forced solution set can hold hundreds of them, and on a radar they pile up into a grey disc that hides the shapes that matter. |
False |
| fill | bool | Lightly shade the inside of each option’s shape. | True |
| show_value_labels | bool | Label each point on a closest_to_target spoke with its signed distance from target (e.g. “+0.09”), since distance from the centre alone can’t show which side of the target it’s on. Off by default, unlike plot_pareto_summary(): every option’s label lands on the same spoke, so beyond a handful of options they pile into an unreadable cluster. Interactive figures always show this on hover instead. |
False |
| title | str | Shown above/below the chart. Stakeholder-facing defaults are used if not provided; pass “” to suppress either. | None |
| caption | str | Shown above/below the chart. Stakeholder-facing defaults are used if not provided; pass “” to suppress either. | None |
| ax | matplotlib.axes.Axes | Existing polar axes to plot onto, e.g. from plt.subplots(subplot_kw={"projection": "polar"}). Ignored if interactive=True. |
None |
Returns
| Name | Type | Description |
|---|---|---|
| matplotlib.figure.Figure or plotly.graph_objects.Figure |