Plots¶
Utility for visualizing two‑task simulations: plots the time evolution of each agent’s normalized task focus and optional task‑switch markers and cue overlay.
------------------------------------¶
plot_curves(experiment,
simulation_results,
title=None,
x_label=None,
y_label=None,
legend_labels=None,
show_legend=False,
legend_location='inside',
legend_fontsize=10,
show_vertical_lines=True,
task_switching_linewidth=1,
task_switching_line_color='black',
task_switching_line_style='--',
show_cue_vector=False,
**kwargs)¶
simulation_results,
title=None,
x_label=None,
y_label=None,
legend_labels=None,
show_legend=False,
legend_location='inside',
legend_fontsize=10,
show_vertical_lines=True,
task_switching_linewidth=1,
task_switching_line_color='black',
task_switching_line_style='--',
show_cue_vector=False,
**kwargs)
Plots simulation curves for a two-task experiment, specifically the time evolution of the
difference between the two task activities for each agent.
Parameters
-
experiment : Experiment
The experiment object that generated the simulation_results.
-
simulation_results : 2D numpy array
The simulation results use to create the plot. The shape should be (number_of_agents * number_of_tasks, total_time).
-
title : str, optional
The title of the plot. The default is None.
-
x_label : str, optional
The x-axis label. The default is None.
-
y_label : str, optional
The y-axis label. The default is None.
-
legend_labels : list of str, optional
The labels for the legend. The default 'Agent i+1' whit i in range(number_of_agents).
-
show_legend : bool, optional
Whether to show the legend. The default is False (the legend is not shown).
-
legend_location : str, optional
The location of the legend. The default is 'inside' (the legend is inside the plot). If 'outside', the legend is outside the plot.
-
legend_fontsize : int, optional
The font size of the legend. The default is 10.
-
show_vertical_lines : bool, optional
Whether to show vertical lines for task-switching times. The default is True (the vertical lines are plotted).
-
task_switching_linewidth : int, optional
The width of the task-switching vertical lines. The default is 1.
-
task_switching_line_color : str, optional
The color of the task-switching vertical lines. The default is 'black'.
-
task_switching_line_style : str, optional
The line style of the task-switching vertical lines. The default is '--'.
-
show_cue_vector : bool, optional
Whether to plot the cue vector. The default is False (the cue vector is not plotted).
-
kwargs** : optional
Additional keyword arguments to pass to the plot function (e.g., color, linestyle, etc.).