musicflower.plotting.plot_time_traces

musicflower.plotting.plot_time_traces(x, y, z, colors, n_steps, group=None)[source]

Plot equally spaced traces from the top to the bottom of the triangle. These can be added to a figure and animated with a slider using the add_time_slider() function. The input arrays must have the same length compatible with a valid triangular map (i.e. a length of n(n+1)/2 for some integer n).

Parameters
  • x (ndarray) – array with x-coordinates

  • y (ndarray) – array with y-coordinates

  • z (ndarray) – array with z-coordinates

  • colors (ndarray) – array with RGB colours

  • n_steps (int) – number time intervals; n_steps + 1 traces are created (incl. time zero and one)

  • group (Optional[str]) – optional name of a group of traces in the legend (allows for switching the time traces on/off with together with the other traces in that legend group)

Return type

List[Scatter3d]

Returns

a list of n_steps + 1 Plotly Scatter3d plots