KineticsPlotComparisonViewer#
- class pyCGM2.Report.Viewers.comparisonPlotViewers.KineticsPlotComparisonViewer(iAnalyses: List[Analysis], context: List[str], legends: List[str], pointLabelSuffix_lst: List[str] | None = None, bodyPart: BodyPartPlot = BodyPartPlot.LowerLimb)#
A viewer for comparing kinetic data across multiple Analysis instances.
Similar to kineticsPlotComparisonViewer, this class is designed for the visualization and comparison of kinetic data from different analysis instances. It supports kinetic data visualization for specified body parts and handles various data suffixes and contexts.
- Parameters:
iAnalyses (List[Analysis]) – Instances of analyses to be compared.
context (str) – The context of the biomechanical event.
legends (List[str]) – Descriptive labels for each analysis instance.
pointLabelSuffix_lst (Optional[List[str]]) – Suffixes for model output labels.
bodyPart (enums.BodyPartPlot) – The body part to be visualized, defaults to LowerLimb.
- __init__(iAnalyses: List[Analysis], context: List[str], legends: List[str], pointLabelSuffix_lst: List[str] | None = None, bodyPart: BodyPartPlot = BodyPartPlot.LowerLimb)#
Initialize the comparison plot viewer
Methods
__init__
(iAnalyses, context, legends[, ...])Initialize the comparison plot viewer
Generates and plots the kinematic comparison panel.
setAutomaticYlimits
(bool)Sets whether Y-axis limits should be auto-adjusted.
setConcretePlotFunction
(concreteplotFunction)Sets a specific plot function for kinetic data visualization.
setNormativeData
()Abstract method to set a normative dataset.
setNormativeDataset
(iNormativeDataSet)Sets the normative dataset for comparison with the analysis data.
- plotPanel()#
Generates and plots the kinematic comparison panel.
This method orchestrates the plotting process, including setting up the layers, arranging data, and rendering the final plot.
- Returns:
matplotlib.figure.Figure – The generated plot as a matplotlib figure object.
- Raises:
Exception – If the concrete plot function is not defined.
- setConcretePlotFunction(concreteplotFunction: Callable)#
Sets a specific plot function for kinetic data visualization.
This method allows the customization of the plot based on the user’s needs, enabling the use of various plot types from the pyCGM2.Report.plot library.
- Parameters:
concreteplotFunction (Callable) – A plot function from pyCGM2.Report.plot.
- setNormativeDataset(iNormativeDataSet: NormativeData)#
Sets the normative dataset for comparison with the analysis data.
- Parameters:
iNormativeDataSet (NormativeData) – An instance of normative data for comparison.