@@ -1285,9 +1285,6 @@ def eventplot(self, positions, orientation='horizontal', lineoffsets=1,
12851285 """
12861286 Plot identical parallel lines at the given positions.
12871287
1288- *positions* should be a 1D or 2D array-like object, with each row
1289- corresponding to a row or column of lines.
1290-
12911288 This type of plot is commonly used in neuroscience for representing
12921289 neural events, where it is usually called a spike raster, dot raster,
12931290 or raster plot.
@@ -1299,48 +1296,53 @@ def eventplot(self, positions, orientation='horizontal', lineoffsets=1,
12991296
13001297 Parameters
13011298 ----------
1302- positions : 1D or 2D array-like object
1303- Each value is an event. If *positions* is a 2D array-like, each
1304- row corresponds to a row or a column of lines (depending on the
1305- *orientation* parameter).
1299+ positions : array-like or list of array-like
1300+ A 1D array-like defines the positions of one sequence of events.
1301+
1302+ Multiple groups of events may be passed as a list of array-likes.
1303+ Each group can be styled independently by passing lists of values
1304+ to *lineoffsets*, *linelengths*, *linewidths*, *colors* and
1305+ *linestyles*.
1306+
1307+ Note that *positions* can be a 2D array, but in practice different
1308+ event groups usually have different counts so that one will use a
1309+ list of different-length arrays rather than a 2D array.
13061310
13071311 orientation : {'horizontal', 'vertical'}, default: 'horizontal'
1308- The direction of the event collections :
1312+ The direction of the event sequence :
13091313
1310- - 'horizontal': the lines are arranged horizontally in rows,
1311- and are vertical.
1312- - 'vertical': the lines are arranged vertically in columns,
1313- and are horizontal.
1314+ - 'horizontal': the events are arranged horizontally.
1315+ The indicator lines are vertical.
1316+ - 'vertical': the events are arranged vertically.
1317+ The indicator lines are horizontal.
13141318
13151319 lineoffsets : float or array-like, default: 1
13161320 The offset of the center of the lines from the origin, in the
13171321 direction orthogonal to *orientation*.
13181322
1319- A sequence must match the dimension of *positions*
1320- in the direction of *orientation *.
1323+ If *positions* is 2D, this can be a sequence with length matching
1324+ the length of *positions *.
13211325
13221326 linelengths : float or array-like, default: 1
13231327 The total height of the lines (i.e. the lines stretches from
13241328 ``lineoffset - linelength/2`` to ``lineoffset + linelength/2``).
13251329
1326- If a sequence, then *positions* must be 2D and the length
1327- must match the first dimension of *positions*.
1330+ If *positions* is 2D, this can be a sequence with length matching
1331+ the length of *positions*.
13281332
1329- linewidths : float or array-like or None, default: None
1330- The line width(s) of the event lines, in points. If it is None,
1331- defaults to its rcParams setting.
1333+ linewidths : float or array-like, default: :rc:`lines.linewidth`
1334+ The line width(s) of the event lines, in points.
13321335
1333- If a sequence, then *positions* must be 2D and the length
1334- must match the first dimension of *positions*.
1336+ If *positions* is 2D, this can be a sequence with length matching
1337+ the length of *positions*.
13351338
1336- colors : color or list of colors or None, default: None
1337- The color(s) of the event lines. If it is None, defaults to its
1338- rcParams setting.
1339+ colors : color or list of colors, default: :rc:`lines.color`
1340+ The color(s) of the event lines.
13391341
1340- If a sequence, then *positions* must be 2D and the length
1341- must match the first dimension of *positions*.
1342+ If *positions* is 2D, this can be a sequence with length matching
1343+ the length of *positions*.
13421344
1343- linestyles : str or tuple or a sequence of such values, optional
1345+ linestyles : str or tuple or list of such values, default: 'solid'
13441346 Default is 'solid'. Valid strings are ['solid', 'dashed',
13451347 'dashdot', 'dotted', '-', '--', '-.', ':']. Dash tuples
13461348 should be of the form::
@@ -1350,11 +1352,10 @@ def eventplot(self, positions, orientation='horizontal', lineoffsets=1,
13501352 where *onoffseq* is an even length tuple of on and off ink
13511353 in points.
13521354
1353- If a sequence, then *positions* must be 2D and the length
1354- must match the first dimension of *positions*.
1355-
1355+ If *positions* is 2D, this can be a sequence with length matching
1356+ the length of *positions*.
13561357
1357- **kwargs : optional
1358+ **kwargs
13581359 Other keyword arguments are line collection properties. See
13591360 `.LineCollection` for a list of the valid properties.
13601361
0 commit comments