pyCGM2.Lib.plot.plot_spatioTemporal#
- pyCGM2.Lib.plot.plot_spatioTemporal(DATA_PATH: str, analysis: Analysis, exportPdf: bool = False, OUT_PATH: str | None = None, outputName: str | None = None, show: bool = True, title: str | None = None, exportPng: bool = False, autoYlim: bool = False)#
Displays spatio-temporal parameters as horizontal histograms.
This function visualizes spatio-temporal parameters from a given analysis instance, showing them in a format of horizontal histograms. It allows for exportation in PDF or PNG formats and offers options for title modification and automatic Y-axis limit adjustment.
- Parameters:
DATA_PATH (str) – Path to the data directory.
analysis (Analysis) – An Analysis instance containing spatio-temporal data.
exportPdf (bool) – If True, exports the plot as a PDF. Defaults to False.
OUT_PATH (Optional[str]) – Path for saving exported files. Defaults to None.
outputName (Optional[str]) – Name of the output file. Defaults to None.
show (bool) – If True, displays 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_spatioTemporal("/myDATA/", analysisInstance)
Note
The function is particularly useful for analyzing and visualizing spatio-temporal gait parameters in a concise and intuitive format.