plotDurs¶
- emlib.matplotting.plotDurs(durs, y0=0.0, x0=0.0, height=1.0, labels=None, color=None, ax=None, groupLabel=None, profile=None, stacked=False)[source]¶
Plot durations as contiguous rectangles
- Parameters:
durs (
list
[float
]) – the durations expressed in secondsy0 – y of origin
x0 – x of origin
height – the height of the drawn rectangles
labels (
Optional
[list
[str
]]) – if given, a label for each rectanglecolor – the color used for the rectangles
ax – the axes to draw on. If not given, a new axes is created (and returned)
groupLabel (
Optional
[str
]) – a label for the groupprofile (
Optional
[dict
]) – the profile used, or None to use a defaultstacked – if True, the rectangles are drawn stacked vertically (the duration is still drawn horizontally). The result is then similar to a bars plot
- Return type:
Axes
- Returns:
the plot axes. If ax was given, then it is returned; otherwise the new axes is returned.