pyCGM2.Lib.plot.plotPFKE#
- pyCGM2.Lib.plot.plotPFKE(DATA_PATH: str, analysisInstance: Analysis, normativeDataset: NormativeData, OUT_PATH: str | None = None, exportPdf: bool = False, outputName: str | None = None, show: bool = True, title: str | None = None, exportPng: bool = False)#
Plots the PlantarFlexor-KneeExtensor (PFKE) index based on an analysis instance.
This function visualizes the PFKE, a classification based on normative datasets.
- Parameters:
DATA_PATH (str) – Path to the data directory.
analysisInstance (Analysis) – An Analysis instance containing kinematic data.
normativeDataset (NormativeData) – A NormativeData instance for comparison.
OUT_PATH (Optional[str]) – Path for saving exported files. Defaults to None.
exportPdf (bool) – If True, exports the plot as a PDF. Defaults to False.
outputName (Optional[str]) – Name of the output file. Defaults to None.
show (bool) – If True, shows the plot using Matplotlib. Defaults to True.
title (Optional[str]) – Title for the plot panel. Defaults to None.
exportPng (bool) – If True, exports the plot as a PNG. Defaults to False.
- Returns:
Union[matplotlib.figure.Figure, Tuple[matplotlib.figure.Figure, str]] – The Matplotlib figure object.
If exporting as PNG, returns a tuple of the figure object and the filename.
Examples
>>> fig = plotPFKE("/data/path", analysisInstance, normativeDataset)