Skip to content

Commit

Permalink
more changes to subagent stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
TomGeorge1234 committed Nov 1, 2024
1 parent 3108682 commit d0dd818
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions ratinabox/contribs/SubAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,17 @@ def plot_trajectory(self,

# other kwargs for SubAgent.plot_trajectory()
**kwargs):
"""A bespoke plotting function taking the same arguments as Agent.plot_trajectory() except now it will jointly plot the True SubAgent and LeadAgent trajectories. By default all kwargs refer to how the SubAgent trajectory is plots and LeadaAgent trajectory is plotted in a dimmer colour (although this can be controlled with lead_agent_plot_kwargs).
"""A bespoke plotting function taking the same arguments as Agent.plot_trajectory() except now it will jointly plot the True SubAgent and LeadAgent trajectories. By default all kwargs refer to how the SubAgent trajectory is plots and LeadAgent trajectory is plotted in a dimmer colour and smaller point size (although this can be controlled with lead_agent_plot_kwargs).
Args:
• t_start --> autosave: see Agent.plot_trajectory
specific args for SubAgent classes
• ontop: if True, plot the SubAgent trajectory on top of the LeadAgent trajectory
• plot_error: if True, will plot an arrow showing the error between the SubAgent and LeadAgent at the end of the trajectory
• show_lead_agent: if True, will plot the trajectory of the LeadAgent
• lead_agent_plot_kwargs: kwargs for plotting the LeadAgent trajectory e.g. it's color, alpha, point size etc. (any kwarg you would pass to Agent.plot_trajectory() can be passed here)
• kwargs: any other kwargs you would pass to Agent.plot_trajectory() can be passed here
• ontop (bool, default False): determines whether the SubAgent trajectory get plotted ontop of or below the LeadAgent trajectory.
• show_lead_agent (bool, default True): determines whether the LeadAgent trajectory is plotted at all.
"""
fig, ax = super().plot_trajectory(
t_start=t_start,
Expand Down

0 comments on commit d0dd818

Please sign in to comment.