corridor_plot
- corridor_plot(df: pandas.DataFrame, subjects: list[str], width: float, height: float, ndays: int = 3, from_date: str | None | datetime = None) matplotlib.figure.Figure[source]
Generates a corridor activity plot for multiple subjects.
Visualizes subject activity (detections and session times) over a specified number of days, with day/night shading.
- Parameters:
df (pd.DataFrame) – DataFrame containing activity data.
subjects (list[str]) – List of subject names to include in the plot.
width (float) – Width of the figure in inches.
height (float) – Height of the figure in inches.
ndays (int, optional) – Number of days to plot. Defaults to 3.
from_date (Union[str, None, datetime], optional) – Start date for the plot. If None, uses the current time. Defaults to None.
- Returns:
The generated matplotlib figure.
- Return type:
Figure