pyCGM2.Lib.plot.plot_MAP#
- pyCGM2.Lib.plot.plot_MAP(DATA_PATH: str, analysis: Analysis, normativeDataset: NormativeData, exportPdf: bool = False, outputName: str | None = None, pointLabelSuffix: str | None = None, show: bool = True, title: str | None = None, exportPng: bool = False, OUT_PATH: str | None = None, autoYlim: bool = False)#
Displays a histogram of the Movement Analysis Profile (MAP).
This function visualizes the MAP, which represents a comparison of an individual’s movement data to normative datasets. It is useful for a comprehensive overview of the movement profile across different aspects.
- Parameters:
DATA_PATH (str) – Path to the data directory.
analysis (Analysis) – An Analysis instance containing movement data.
normativeDataset (NormativeData) – A NormativeData instance for comparison.
pointLabelSuffix (Optional[str]) – Suffix previously added to model outputs. Defaults to None.
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.
autoYlim (bool) – If True, sets Y-axis limits automatically. 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 = plot_MAP("/data/path", analysisInstance, normativeDataset)