Axes.
eventplot
(positions, orientation='horizontal', lineoffsets=1, linelengths=1, linewidths=None, colors=None, linestyles='solid', **kwargs)¶Plot identical parallel lines at specific positions.
Call signature:
eventplot(positions, orientation='horizontal', lineoffsets=0,
linelengths=1, linewidths=None, color =None,
linestyles='solid'
Plot parallel lines at the given positions. positions should be a 1D or 2D array-like object, with each row corresponding to a row or column of lines.
This type of plot is commonly used in neuroscience for representing neural events, where it is commonly called a spike raster, dot raster, or raster plot.
However, it is useful in any situation where you wish to show the timing or position of multiple sets of discrete events, such as the arrival times of people to a business on each day of the month or the date of hurricanes each year of the last century.
For linelengths, linewidths, colors, and linestyles, if only a single value is given, that value is applied to all lines. If an array-like is given, it must have the same length as positions, and each value will be applied to the corresponding row or column in positions.
Returns a list of matplotlib.collections.EventCollection
objects that were added.
kwargs are LineCollection
properties:
Property Description agg_filter
unknown alpha
float or None animated
[True | False] antialiased
or antialiasedsBoolean or sequence of booleans array
unknown axes
an Axes
instancebottom_margin
unknown clim
a length 2 sequence of floats clip_box
a matplotlib.transforms.Bbox
instanceclip_on
[True | False] clip_path
[ ( Path
,Transform
) |Patch
| None ]cmap
a colormap or registered colormap name color
matplotlib color arg or sequence of rgba tuples contains
a callable function edgecolor
or edgecolorsmatplotlib color spec or sequence of specs facecolor
or facecolorsmatplotlib color spec or sequence of specs figure
a matplotlib.figure.Figure
instancegid
an id string hatch
[ ‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’ ] label
string or anything printable with ‘%s’ conversion. left_margin
unknown linestyle
or dashes or linestyles[‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) | '-'
|'--'
|'-.'
|':'
|'None'
|' '
|''
]linewidth
or linewidths or lwfloat or sequence of floats margins
unknown norm
unknown offset_position
unknown offsets
float or sequence of floats path_effects
unknown paths
unknown picker
[None|float|boolean|callable] pickradius
unknown rasterized
[True | False | None] right_margin
unknown segments
unknown sketch_params
unknown snap
unknown top_margin
unknown transform
Transform
instanceurl
a url string urls
unknown verts
unknown visible
[True | False] zorder
any number
Example:
(Source code, png, pdf)
Notes
In addition to the above described arguments, this function can take a data keyword argument. If such a data argument is given, the following arguments are replaced by data[<arg>]: