maui.visualizations.parallel_coordinates_plot¶
- maui.visualizations.parallel_coordinates_plot(df, indices, color_col, show_plot=True)[source]¶
Plots a parallel coordinates chart for comparing acoustic indices for some categorical variable.
- Return type:
Figure
- Parameters:
- dfpandas.DataFrame
Input DataFrame containing the data to plot.
- indiceslist
List of column names (strings) from df that represents the acoustic indices to be used as parallel axes. All must be numerical.
- color_colstr, optional
Name of the column to use for coloring the lines. Can be categorical or numerical. Required.
- show_plotbool, default True
If True, the plot is displayed interactively. If False, the Plotly figure object is returned without displaying.
- Returns:
- figplotly.graph_objects.Figure
The Plotly Figure object containing the parallel coordinates plot.
- Raises:
- IndexError
If indices is empty or has fewer than two elements.
- AssertionError
If any value in indices or color_col is not a column in df.
Notes
For categorical colors, colors and legend associations are assigned
automatically. - The legend for categories appears below the plot and is adjusted to avoid overlapping plot elements. - If the coloring column is numerical, a standard colorbar is shown. - Only numerical columns can be used for parallel axes.