Skip to content

Commit 9967a3e

Browse files
committed
clarify example in plot docstring
1 parent e629aff commit 9967a3e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/matplotlib/axes/_axes.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -1418,10 +1418,14 @@ def plot(self, *args, scalex=True, scaley=True, data=None, **kwargs):
14181418
directly to *x*, *y*. A separate data set will be drawn for every
14191419
column.
14201420
1421-
Example: an array ``a`` where the first column represents the *x*
1422-
values and the other columns are the *y* columns::
1421+
Example: For an array ``a`` with shape (N, m) calling::
14231422
1424-
>>> plot(a[0], a[1:])
1423+
>>> plot(a)
1424+
1425+
is equivalent to:
1426+
1427+
>>> for i in range(m):
1428+
... plot(a[:, i])
14251429
14261430
- The third way is to specify multiple sets of *[x]*, *y*, *[fmt]*
14271431
groups::

0 commit comments

Comments
 (0)