negmas.plots¶
Module for plotting functionality using plotly.
- negmas.plots.default_colorizer(t: TraceElement)[source]¶
Default colorizer.
- Parameters:
t –
- negmas.plots.opacity_colorizer(t: TraceElement, alpha: float = 1.0)[source]¶
Opacity colorizer.
- Parameters:
t –
alpha – Alpha.
- negmas.plots.plot_2dutils(trace: list[TraceElement], plotting_ufuns: list[UtilityFunction] | tuple[UtilityFunction, ...], plotting_negotiators: list[str] | tuple[str, ...], offering_negotiators: list[str] | tuple[str, ...] | None = None, agreement: tuple | None = None, outcome_space: OutcomeSpace | None = None, issues: list[Issue] | tuple[Issue, ...] | None = None, outcomes: list[tuple] | tuple[tuple, ...] | None = None, with_lines: bool = True, show_annotations: bool = True, show_agreement: bool = False, show_pareto_distance: bool = True, show_nash_distance: bool = True, show_kalai_distance: bool = True, show_ks_distance: bool = True, show_max_welfare_distance: bool = True, mark_pareto_points: bool = True, mark_all_outcomes: bool = True, mark_nash_points: bool = True, mark_kalai_points: bool = True, mark_ks_points: bool = True, mark_max_welfare_points: bool = True, show_max_relative_welfare_distance: bool = True, show_reserved: bool = True, show_total_time: bool = True, show_relative_time: bool = True, show_n_steps: bool = True, end_reason: str | None = None, extra_annotation: str | None = None, name_map: dict[str, str] | Callable[[str], str] | None = None, colors: list | None = None, markers: list[str] | None = None, colormap: str = 'Jet', fig: Figure | None = None, row: int = 1, col: int = 1, colorizer: Callable[[TraceElement], float] | None = None, fast: bool = False)[source]¶
Plot 2D utilities using plotly.
- Parameters:
trace – Trace.
plotting_ufuns – Plotting ufuns.
plotting_negotiators – Plotting negotiators.
offering_negotiators – Offering negotiators.
agreement – Agreement.
outcome_space – Outcome space.
issues – Issues.
outcomes – Outcomes.
with_lines – With lines.
show_annotations – Show annotations.
show_agreement – Show agreement.
show_pareto_distance – Show pareto distance.
show_nash_distance – Show nash distance.
show_kalai_distance – Show kalai distance.
show_ks_distance – Show ks distance.
show_max_welfare_distance – Show max welfare distance.
mark_pareto_points – Mark pareto points.
mark_all_outcomes – Mark all outcomes.
mark_nash_points – Mark nash points.
mark_kalai_points – Mark kalai points.
mark_ks_points – Mark ks points.
mark_max_welfare_points – Mark max welfare points.
show_max_relative_welfare_distance – Show max relative welfare distance.
show_reserved – Show reserved.
show_total_time – Show total time.
show_relative_time – Show relative time.
show_n_steps – Show n steps.
end_reason – End reason.
extra_annotation – Extra annotation.
name_map – Name map.
colors – Colors.
markers – Markers.
colormap – Colormap.
fig – Plotly figure.
row – Row in subplot.
col – Column in subplot.
colorizer – Colorizer.
fast – Fast mode.
- negmas.plots.plot_mechanism_run(mechanism: PlottableMechanism, *, negotiators: tuple[int, int] | tuple[str, str] | None = (0, 1), save_fig: bool = False, path: str | None = None, fig_name: str | None = None, ignore_none_offers: bool = True, with_lines: bool = True, show_agreement: bool = False, show_pareto_distance: bool = True, show_nash_distance: bool = True, show_kalai_distance: bool = True, show_ks_distance: bool = True, show_max_welfare_distance: bool = True, show_max_relative_welfare_distance: bool = False, show_end_reason: bool = True, show_annotations: bool = False, show_reserved: bool = True, show_total_time: bool = True, show_relative_time: bool = True, show_n_steps: bool = True, colors: list | None = None, markers: list[str] | None = None, colormap: str = 'Jet', ylimits: tuple[float, float] | None = None, common_legend: bool = True, extra_annotation: str = '', xdim: str = 'relative_time', colorizer: Callable[[TraceElement], float] | None = None, only2d: bool = False, no2d: bool = False, fast: bool = False, simple_offers_view: bool = False, mark_offers_view: bool = True, mark_pareto_points: bool = True, mark_all_outcomes: bool = True, mark_nash_points: bool = True, mark_kalai_points: bool = True, mark_ks_points: bool = True, mark_max_welfare_points: bool = True, show: bool = True)[source]¶
Plot mechanism run using plotly.
- Parameters:
mechanism – Mechanism.
- negmas.plots.plot_offer_utilities(trace: list[TraceElement], negotiator: str, plotting_ufuns: list[BaseUtilityFunction | None], plotting_negotiators: list[str], ignore_none_offers: bool = True, name_map: dict[str, str] | Callable[[str], str] | None = None, colors: list | None = None, markers: list | None = None, colormap: str = 'Jet', fig: Figure | None = None, row: int = 1, col: int = 1, sharey: bool = False, xdim: str = 'relative_time', ylimits: tuple[float, float] | None = None, show_legend: bool = True, show_x_label: bool = True, ignore_markers_limit: int = 200, show_reserved: bool = True, colorizer: Callable[[TraceElement], float] | None = None, first_color_index: int = 0, mark_offers_view: bool = True)[source]¶
Plot offer utilities using plotly.
- Parameters:
trace – Trace.
negotiator – Negotiator.
plotting_ufuns – Plotting ufuns.
plotting_negotiators – Plotting negotiators.
ignore_none_offers – Ignore none offers.
name_map – Name map.
colors – Colors.
markers – Markers.
colormap – Colormap.
fig – Plotly figure (if None, creates new one).
row – Row in subplot grid.
col – Column in subplot grid.
sharey – Share y axis.
xdim – X dimension.
ylimits – Y limits.
show_legend – Show legend.
show_x_label – Show x label.
ignore_markers_limit – Ignore markers limit.
show_reserved – Show reserved.
colorizer – Colorizer.
first_color_index – First color index.
mark_offers_view – Mark offers view.
- negmas.plots.plot_offline_run(trace: list[TraceElement], ids: list[str], ufuns: list[BaseUtilityFunction] | tuple[BaseUtilityFunction, ...], agreement: tuple | None, timedout: bool, broken: bool, has_error: bool, errstr: str = '', names: list[str] | None = None, *, negotiators: tuple[int, int] | tuple[str, str] | None = (0, 1), save_fig: bool = False, path: str | None = None, fig_name: str | None = None, ignore_none_offers: bool = True, with_lines: bool = True, show_agreement: bool = False, show_pareto_distance: bool = True, show_nash_distance: bool = True, show_kalai_distance: bool = True, show_ks_distance: bool = True, show_max_welfare_distance: bool = True, show_max_relative_welfare_distance: bool = False, show_end_reason: bool = True, show_annotations: bool = False, show_reserved: bool = True, show_total_time: bool = True, show_relative_time: bool = True, show_n_steps: bool = True, colors: list | None = None, markers: list[str] | None = None, colormap: str = 'Jet', ylimits: tuple[float, float] | None = None, common_legend: bool = True, extra_annotation: str = '', xdim: str = 'relative_time', colorizer: Callable[[TraceElement], float] | None = None, only2d: bool = False, no2d: bool = False, fast: bool = False, simple_offers_view: bool = False, mark_offers_view: bool = True, mark_pareto_points: bool = True, mark_all_outcomes: bool = True, mark_nash_points: bool = True, mark_kalai_points: bool = True, mark_ks_points: bool = True, mark_max_welfare_points: bool = True, show: bool = True)[source]¶
Plot offline run using plotly.
- Parameters:
trace – Trace.
ids – Ids.
ufuns – Ufuns.
agreement – Agreement.
timedout – Timedout.
broken – Broken.
has_error – Has error.
errstr – Error string.
names – Names.