larvaworld.lib.plot.metric ========================== .. py:module:: larvaworld.lib.plot.metric .. autoapi-nested-parse:: Calibration-related plotting Functions --------- .. autoapisummary:: larvaworld.lib.plot.metric.plot_segmentation_definition larvaworld.lib.plot.metric.plot_stride_variability larvaworld.lib.plot.metric.plot_correlated_pars Module Contents --------------- .. py:function:: plot_segmentation_definition(subfolder: str = 'metric_definition', **kwargs: Any) -> Any Plot body segmentation definition analysis. Creates dual-panel plots showing regression scores and correlation analysis for different angular velocity combinations used in body segmentation. Args: subfolder: Subfolder for saving. Defaults to 'metric_definition' **kwargs: Additional arguments passed to AutoPlot Returns: Plot output (figure object or None based on return_fig setting) Example: >>> fig = plot_segmentation_definition(datasets=[d1, d2]) .. py:function:: plot_stride_variability(component_vels: bool = True, subfolder: str = 'metric_definition', **kwargs: Any) -> Any Plot stride spatiotemporal variability analysis. Creates scatter plots showing coefficient of variation for spatial vs temporal stride components across different velocity definitions. Args: component_vels: Include component velocities. Defaults to True subfolder: Subfolder for saving. Defaults to 'metric_definition' **kwargs: Additional arguments passed to AutoPlot Returns: Plot output (figure object or None based on return_fig setting) Example: >>> fig = plot_stride_variability(datasets=[d1, d2], component_vels=True) .. py:function:: plot_correlated_pars(pars: Sequence[str], labels: Sequence[str], refID: Optional[str] = None, dataset: Any = None, save_to: Optional[str] = None, save_as: str = 'correlated_pars.pdf', return_fig: bool = False, show: bool = False) -> Any Create pairwise correlation plots for endpoint parameters. Generates seaborn PairGrid with scatter plots, KDE plots, and confidence ellipses showing correlations between three endpoint parameters. Args: pars: List of 3 parameter keys to analyze (currently only 3 supported) labels: List of 3 labels for the parameters refID: Reference dataset ID. Required if dataset is None dataset: Pre-loaded dataset. Loads from refID if None save_to: Directory to save plot. Uses dataset plot dir if None save_as: Filename for saved plot. Defaults to 'correlated_pars.pdf' return_fig: Whether to return figure object. Defaults to False show: Whether to display plot. Defaults to False Returns: Plot output (figure object or None based on return_fig setting) Example: >>> fig = plot_correlated_pars(pars=['cum_sd', 'run_tr', 'pau_tr'], labels=['Distance', 'Run', 'Pause'], refID='ref_01')