Skip to content

Commit b03b7a4

Browse files
authored
Merge pull request #18701 from meeseeksmachine/auto-backport-of-pr-18700-on-v3.3.2-doc
Backport PR #18700 on branch v3.3.2-doc (clarify example in plot docstring)
2 parents 6911429 + 1c6ad28 commit b03b7a4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,10 +1566,14 @@ def plot(self, *args, scalex=True, scaley=True, data=None, **kwargs):
15661566
directly to *x*, *y*. A separate data set will be drawn for every
15671567
column.
15681568
1569-
Example: an array ``a`` where the first column represents the *x*
1570-
values and the other columns are the *y* columns::
1569+
Example: For an array ``a`` with shape (N, m) calling::
15711570
1572-
>>> plot(a[0], a[1:])
1571+
>>> plot(a)
1572+
1573+
is equivalent to:
1574+
1575+
>>> for i in range(m):
1576+
... plot(a[:, i])
15731577
15741578
- The third way is to specify multiple sets of *[x]*, *y*, *[fmt]*
15751579
groups::

0 commit comments

Comments
 (0)