staircase.plot#
- staircase.plot(collection, ax=None, **kwargs)#
Plots a collection of
Stairsinstances to a single axes- Parameters:
- collectionarray-like, dictionary or pandas.Series
The Stairs instances at which to evaluate
- 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().
- Returns:
See also
Examples
>>> import staircase as sc >>> import matplotlib.pyplot as plt
>>> stairs = [s2, s3] >>> _, ax = plt.subplots(figsize=(4,3)) >>> sc.plot(stairs, ax), >>> ax.legend()
>>> stairs = {"s1":s1, "s2":s2} >>> _, ax = plt.subplots(figsize=(4,3)) >>> sc.plot(stairs, ax) >>> ax.legend()