staircase.StairsArray.plot#

StairsArray.plot(ax=None, labels=None, **kwargs)#

Plots a collection of Stairs instances to a single axes

Parameters
axmatplotlib.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().

Returns
matplotlib.axes.Axes

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()
../../_images/staircase-StairsArray-plot-1.png