larvaworld.lib.plot.bar
Barplots
Functions
|
Create bar plots comparing error metrics across models. |
|
Create bar plot of food intake amounts. |
|
Create bar plots with statistical comparisons across datasets. |
|
Create automatic bar plots with enhanced statistical annotations. |
Module Contents
- larvaworld.lib.plot.bar.error_barplot(error_dict: Dict[str, Any], evaluation: Dict[str, Any], labels: Dict[str, str] | None = None, name: str = 'error_barplots', titles: Sequence[str] = ('$\\bf{endpoint}$ $\\bf{metrics}$', '$\\bf{timeseries}$ $\\bf{metrics}$'), **kwargs: Any) Any
Create bar plots comparing error metrics across models.
Generates multi-panel bar plots showing endpoint and timeseries error metrics for different model configurations with statistical comparisons.
- Args:
error_dict: Dictionary of error DataFrames by metric type evaluation: Dictionary of evaluation metadata with group labels and colors labels: Custom labels for metric types. Defaults to metric keys name: Plot name for saving. Defaults to ‘error_barplots’ titles: Panel titles. Defaults to endpoint and timeseries labels **kwargs: Additional arguments passed to AutoBasePlot
- Returns:
Plot output (figure object or None based on return_fig setting)
- Example:
>>> fig = error_barplot(error_dict, evaluation, labels={'endpoint': 'Endpoints'})
- larvaworld.lib.plot.bar.intake_barplot(**kwargs: Any) Any
Create bar plot of food intake amounts.
Convenience wrapper for barplot() specifically for food amount (‘f_am’) parameter visualization across datasets.
- Args:
**kwargs: Arguments passed to barplot()
- Returns:
Plot output (figure object or None based on return_fig setting)
- Example:
>>> fig = intake_barplot(datasets=[d1, d2], labels=['Control', 'Test'])
- larvaworld.lib.plot.bar.barplot(ks: Sequence[str], coupled_labels: Sequence[str] | None = None, xlabel: str | None = None, leg_cols: Sequence[str] | None = None, **kwargs: Any) Any
Create bar plots with statistical comparisons across datasets.
Generates bar plots for specified parameters showing mean values with error bars and p-values from t-tests between dataset pairs.
- Args:
ks: Parameter keys to plot coupled_labels: Labels for paired comparisons. If provided, datasets
are grouped into pairs
xlabel: Custom x-axis label. Defaults to None leg_cols: Colors for legend items. Auto-generated if None **kwargs: Additional arguments passed to AutoPlot
- Returns:
Plot output (figure object or None based on return_fig setting)
- Example:
>>> fig = barplot(ks=['v', 'a'], datasets=[d1, d2], labels=['Control', 'Test'])
- larvaworld.lib.plot.bar.auto_barplot(ks: Sequence[str], coupled_labels: Sequence[str] | None = None, xlabel: str | None = None, leg_cols: Sequence[str] | None = None, **kwargs: Any) Any
Create automatic bar plots with enhanced statistical annotations.
Similar to barplot() but with enhanced automatic layout and statistical significance markers for paired comparisons. Shows asterisks for p <= 0.05.
- Args:
ks: Parameter keys to plot coupled_labels: Labels for paired comparisons. If provided, datasets
are grouped into pairs
xlabel: Custom x-axis label. Defaults to None leg_cols: Colors for legend items. Auto-generated if None **kwargs: Additional arguments passed to AutoPlot
- Returns:
Plot output (figure object or None based on return_fig setting)
- Example:
>>> fig = auto_barplot(ks=['run_count'], coupled_labels=['Control', 'Treatment'])