fairical.plot

Plotting utilities.

Functions

pareto_plot(solutions[, axes_labels, alpha, ...])

Generate pareto plot for all systems under comparison.

radar_chart(indicators[, axes])

Generate radar chart for all systems under comparison.

fairical.plot.radar_chart(indicators, axes={'as': '$AS$', 'hv': '$HV$', 'onvgr': '$ONVGR$', 'relative-onvg': '$\\\\widehat{ONVG}$', 'ud': '$UD$'})[source]

Generate radar chart for all systems under comparison.

This method generates radar chart given performance indicator values in comparison of systems. It requires the presence of complement-ud and relative-onvg on indicators.

Parameters:
  • indicators (dict[str, dict[Literal['hv', 'ud', 'os', 'as', 'onvg', 'onvgr', 'relative-onvg', 'area'], float]]) – Indicators organized in a single dictionary where keys represent system labels, and values, dictionaries with at least the same keys as listed in axes_keys.

  • axes (dict[Union[Literal['hv', 'ud', 'os', 'as', 'onvg', 'onvgr', 'relative-onvg', 'area'], str], str]) – A dictionary containing the indicator keys that will be drawn on the radar chart, and corresponding labels associated with each of those axes. You can use LaTeX symbols and notations on the values of the dictionary.

  • title – The plot title.

  • **kwargs – Additional keyword arguments for updating chart properties. Supported options: - linewidth: Line width - linestyle: Line style

Return type:

tuple[Figure, Axes]

Returns:

A tuple containing both the matplotlib figure and axes used to create the radar chart.

fairical.plot.pareto_plot(solutions, axes_labels={}, alpha=0.2, hide_ds=False)[source]

Generate pareto plot for all systems under comparison.

This method generates pareto plot given solutions of systems in comparison.

Parameters:
  • solutions (dict[str, tuple[Solutions, Solutions]]) – A dictionary where keys represent system names (that will be used as labels), and values are tuples with non-dominated (nds) and dominated solutions (ds) respectively.

  • axes_labels (dict[str, str]) – If specified, overwrites the default labels for dimensions in fairical.solutions.Solutions. Should be a dictionary that maps the keys in each fairical.solutions.Solutions object to a single label. If not set, then we use a default setup provided in the module.

  • alpha (float) – Alpha blend between non-dominated (fully opaque) and dominated solutions (partly transparent).

  • hide_ds (bool) – If true, hide the ds points for a-priori data from the plot.

Return type:

tuple[Figure, Axes]

Returns:

A tuple of lists containing both the matplotlib figures and axes used to create the pareto plot. The lists will contain 2 elements each if separate is True, 1 otherwise.