Skip to content

Commit

Permalink
DOC: Improve stairs docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
timhoffm committed Mar 19, 2024
1 parent a8d8915 commit 6e24418
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion galleries/plot_types/basic/stairs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
==============
stairs(values)
==============
A stepwise constant function as a line with bounding edges or a filled plot.
Draw a stepwise constant function as a line or a filled plot.
See `~matplotlib.axes.Axes.stairs` when plotting :math:`y` between
:math:`(x_i, x_{i+1})`. For plotting :math:`y` at :math:`x`, see
Expand Down
9 changes: 6 additions & 3 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -7104,16 +7104,19 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
def stairs(self, values, edges=None, *,
orientation='vertical', baseline=0, fill=False, **kwargs):
"""
A stepwise constant function as a line with bounding edges
or a filled plot.
Draw a stepwise constant function as a line or a filled plot.
*edges* define the x-axis positions of the steps. *values* the function values
between these steps. Depending on *fill*, the function is drawn either as a
continuous line with vertical segments at the edges, or as a filled area.
Parameters
----------
values : array-like
The step heights.
edges : array-like
The edge positions, with ``len(edges) == len(vals) + 1``,
The step positions, with ``len(edges) == len(vals) + 1``,
between which the curve takes on vals values.
orientation : {'vertical', 'horizontal'}, default: 'vertical'
Expand Down

0 comments on commit 6e24418

Please sign in to comment.