staircase.StairsArray.plot#
- StairsArray.plot(ax=None, labels=None, **kwargs)#
Plots a collection of
Stairs
instances to a single axes- Parameters:
- ax
matplotlib.axes.Axes
, optional If supplied will plot to this axes
- labelsarray-like, optional
Used to label each step function. Use ax.legend() to show.
- **kwargs
Additional parameters are the same as those for
staircase.Stairs.plot()
.
- ax
- Returns:
See also
Examples
>>> import staircase as sc >>> import matplotlib.pyplot as plt
>>> stairs = sc.StairsArray([s2, s3]) >>> _, ax = plt.subplots(figsize=(4,3)) >>> stairs.plot(ax) >>> ax.legend()