),f"A 3 dimensional array was expected (entity, timestep, 3). There were {poses.ndim} dimensions in poses: {poses.shape}"
assertposes.shape[2]in[3,4]
agents=poses.shape[0]
entity_names=[]
...
...
@@ -682,9 +684,26 @@ class File(h5py.File):
figsize=None,
step_size=4,
c=None,
cmap="Set1",
skip_timesteps=0,
max_timesteps=None,
):
"""Plot the file using matplotlib.pyplot
The tracks in the file are plotted using matplotlib.plot().
Args:
ax (matplotlib.axes, optional): An axes object to plot in. If None is given, a new figure is created.
lw_distances (bool, optional): Flag to show the distances between individuals through line width.
figsize (Tuple[int], optional): Size of a newly created figure.
step_size (int, optional): when using lw_distances, the track is split into sections which have a common line width. This parameter defines the length of the sections.
c (Array[color_representation], optional): An array of colors. Each item has to be matplotlib.colors.is_color_like(item).
cmap (matplotlib.colors.Colormap, optional): The colormap to use
skip_timesteps (int, optional): Skip timesteps in the begining of the file
max_timesteps (int, optional): Cut of timesteps in the end of the file.