ndi.fun.ensemble.plot
ndi.fun.ensemble.plot - draw a spike raster of an ensemble
H = ndi.fun.ensemble.PLOT(E, ...)
H = ndi.fun.ensemble.PLOT(S, ENSEMBLEELEMENT, EPOCH, ...)
Draws an ensemble as a spike raster in the current axes (gca), as a single
line object. There are two ways to provide the data:
ndi.fun.ensemble.plot(E, ...)
E is an ensemble structure from ndi.fun.ensemble.read (optionally passed
through ndi.fun.ensemble.filter first). The raster is drawn from
E.activity, so you can filter before plotting.
ndi.fun.ensemble.plot(S, ENSEMBLEELEMENT, EPOCH, ...)
Convenience form: reads EPOCH of ENSEMBLEELEMENT (an ndi.element.ensemble
or its document / id) from session S and plots the whole (unfiltered)
ensemble.
Each neuron ("cell") i (the row index in E.activity) is drawn as a horizontal
band of tick marks: every spike is a short vertical line at the spike time (X
axis) spanning the vertical interval [BottomEdge, TopEdge] + i*Offset on the Y
axis. With the defaults (0.1, 0.9, 1.0), cell 1 occupies 1.1 to 1.9, cell 2
occupies 2.1 to 2.9, and so on.
The entire raster is one line object: the tick coordinates are concatenated
with a NaN separating successive ticks (a spike at time t of cell i
contributes (t, bottom_i), (t, top_i), (NaN, NaN)). One line keeps the initial
plot and any redraw (setting H.XData / H.YData) fast for large ensembles.
=========================================================================
OPTIONS (name/value pairs)
=========================================================================
BottomEdge (0.1) - distance from a cell's baseline to the bottom of its
tick marks.
TopEdge (0.9) - distance from a cell's baseline to the top of its ticks.
Offset (1.0) - spacing between successive cells along the Y axis.
Color ([0 0 0]) - color of the tick marks (RGB triplet or color name).
LineWidth (0.75) - width of the tick-mark lines, in points.
XLabel (true) - if true, label the X axis 'Time(s)'.
YLabel (true) - if true, label the Y axis 'Neuron #'.
=========================================================================
OUTPUT
=========================================================================
H - the handle to the single line object that draws the raster.
=========================================================================
EXAMPLE
=========================================================================
E = ndi.fun.ensemble.read(S, ens, 'epoch_1', 'MinQuality', 2);
figure; ndi.fun.ensemble.plot(E);
See also: ndi.fun.ensemble.read, ndi.fun.ensemble.filter, LINE