larvaworld.lib.plot.bar ======================= .. py:module:: larvaworld.lib.plot.bar .. autoapi-nested-parse:: Barplots Functions --------- .. autoapisummary:: larvaworld.lib.plot.bar.error_barplot larvaworld.lib.plot.bar.intake_barplot larvaworld.lib.plot.bar.barplot larvaworld.lib.plot.bar.auto_barplot Module Contents --------------- .. py:function:: error_barplot(error_dict: Dict[str, Any], evaluation: Dict[str, Any], labels: Optional[Dict[str, str]] = 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'}) .. py:function:: 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']) .. py:function:: barplot(ks: Sequence[str], coupled_labels: Optional[Sequence[str]] = None, xlabel: Optional[str] = None, leg_cols: Optional[Sequence[str]] = 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']) .. py:function:: auto_barplot(ks: Sequence[str], coupled_labels: Optional[Sequence[str]] = None, xlabel: Optional[str] = None, leg_cols: Optional[Sequence[str]] = 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'])