Skip to content

Commit 6e24418

Browse files
committed
DOC: Improve stairs docstring
1 parent a8d8915 commit 6e24418

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

galleries/plot_types/basic/stairs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
==============
33
stairs(values)
44
==============
5-
A stepwise constant function as a line with bounding edges or a filled plot.
5+
Draw a stepwise constant function as a line or a filled plot.
66
77
See `~matplotlib.axes.Axes.stairs` when plotting :math:`y` between
88
:math:`(x_i, x_{i+1})`. For plotting :math:`y` at :math:`x`, see

lib/matplotlib/axes/_axes.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7104,16 +7104,19 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
71047104
def stairs(self, values, edges=None, *,
71057105
orientation='vertical', baseline=0, fill=False, **kwargs):
71067106
"""
7107-
A stepwise constant function as a line with bounding edges
7108-
or a filled plot.
7107+
Draw a stepwise constant function as a line or a filled plot.
7108+
7109+
*edges* define the x-axis positions of the steps. *values* the function values
7110+
between these steps. Depending on *fill*, the function is drawn either as a
7111+
continuous line with vertical segments at the edges, or as a filled area.
71097112
71107113
Parameters
71117114
----------
71127115
values : array-like
71137116
The step heights.
71147117
71157118
edges : array-like
7116-
The edge positions, with ``len(edges) == len(vals) + 1``,
7119+
The step positions, with ``len(edges) == len(vals) + 1``,
71177120
between which the curve takes on vals values.
71187121
71197122
orientation : {'vertical', 'horizontal'}, default: 'vertical'

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy