Skip to content

Commit b3e6248

Browse files
authored
Merge pull request #16553 from tacaswell/doc_clarify_eventplot
DOC: clarify the expected shapes of eventplot input
2 parents cffff13 + e9a6336 commit b3e6248

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

lib/matplotlib/axes/_axes.py

+16
Original file line numberDiff line numberDiff line change
@@ -1271,18 +1271,30 @@ def eventplot(self, positions, orientation='horizontal', lineoffsets=1,
12711271
The offset of the center of the lines from the origin, in the
12721272
direction orthogonal to *orientation*.
12731273
1274+
A sequence must match the dimension of *positions*
1275+
in the direction of *orientation*.
1276+
12741277
linelengths : scalar or sequence of scalars, default: 1
12751278
The total height of the lines (i.e. the lines stretches from
12761279
``lineoffset - linelength/2`` to ``lineoffset + linelength/2``).
12771280
1281+
If a sequence, then *positions* must be 2D and the length
1282+
must match the first dimension of *positions*.
1283+
12781284
linewidths : scalar, scalar sequence or None, default: None
12791285
The line width(s) of the event lines, in points. If it is None,
12801286
defaults to its rcParams setting.
12811287
1288+
If a sequence, then *positions* must be 2D and the length
1289+
must match the first dimension of *positions*.
1290+
12821291
colors : color, sequence of colors or None, default: None
12831292
The color(s) of the event lines. If it is None, defaults to its
12841293
rcParams setting.
12851294
1295+
If a sequence, then *positions* must be 2D and the length
1296+
must match the first dimension of *positions*.
1297+
12861298
linestyles : str or tuple or a sequence of such values, optional
12871299
Default is 'solid'. Valid strings are ['solid', 'dashed',
12881300
'dashdot', 'dotted', '-', '--', '-.', ':']. Dash tuples
@@ -1293,6 +1305,10 @@ def eventplot(self, positions, orientation='horizontal', lineoffsets=1,
12931305
where *onoffseq* is an even length tuple of on and off ink
12941306
in points.
12951307
1308+
If a sequence, then *positions* must be 2D and the length
1309+
must match the first dimension of *positions*.
1310+
1311+
12961312
**kwargs : optional
12971313
Other keyword arguments are line collection properties. See
12981314
`.LineCollection` for a list of the valid properties.

0 commit comments

Comments
 (0)