Matplotlib helpers#
- module:
- Plots an agent as a disc together with: - a smaller dot to indicate the direction - an optional arrow for its velocity - an optional circle for the safety margin - Parameters:
- ax – The pyplot axes 
- agent – The agent 
- pose – A pose that override the agent own pose. 
- velocity – A velocity that override the agent own velocity. 
- velocity_arrow_width – The width of the velocity arrow 
- velocity_arrow_edge_color – The stroke color of the velocity arrow 
- velocity_arrow_alpha – The opacity of the velocity arrow 
- color – The color 
- alpha – The opacity 
- dot_color – The color of the dot 
- dot_radius – The relative radius of the dot as fraction of the radius 
- with_safety_margin – Whether to display the safety margin 
- transform – An optional affine transformation to apply to the plot 
- zorder – The Z-order 
 
 
- Plots a world. - Parameters:
- ax – The pyplot axes 
- world – The world 
- obstacles_color – The color of obstacles and walls 
- obstacles_alpha – The opacity of obstacles and walls 
- in_box – Whether to restrict the plot within the world bounding box 
- no_ticks – Whether to remove the axis ticks 
- with_agents – Whether to plot agents 
- transform – An optional affine transformation to apply to the plot 
- zorder – The Z-order 
- kwargs – Keywords passed to - plot_agent()
 
 
- Plots a trajectory composed by an array of poses - (x, y, theta)- Parameters:
- ax – The pyplot axes 
- poses – The poses 
- color – The color 
- agent – The agent to display or none 
- step – The regular step at which to display the agent if provided or a dot 
- label – The label 
- plot_last_pose – Whether to force plotting the last agent pose 
- zorder – The Z-order 
- kwargs – Keywords passed to - plot_agent()
 
 
- Plots an experimental run - Parameters:
- ax – The pyplot axes 
- run – The run 
- agent_indices – The indices of the agents whose trajectory should be plotted. 
- step – The regular step at which to display the agent if provided or a dot 
- label – The label 
- with_agent – Whether to display agents 
- color – A function to assign a color to an agent. If not provided, it will fallback to the agent’s own color. 
- agent_kwargs – Keywords arguments passed to - plot_agent()
- with_world – Whether to display the world 
- world_kwargs – Keywords arguments passed to - plot_world()