eelbrain.plot.TopoArray
- class eelbrain.plot.TopoArray(y, xax=None, data=None, sub=None, vmax=None, vmin=None, cmap=None, contours=None, ntopo=None, t=(), xlim=None, proj='default', res=None, interpolation=None, clip='even', clip_distance=0.05, head_radius=None, head_pos=0, im_interpolation=None, sensors='.', sensorlabels=None, mark=None, mcolor=None, axtitle=True, xlabel=True, ylabel=True, xticklabels='bottom', yticklabels='left', connectionstyle='angle3,angleA=90,angleB=0', connection_color=(0.0, 0.6, 0.5), topo_labels='above', gridspec_kw=None, **kwargs)
Channel by sample plots with topomaps for individual time points
- Parameters:
y (Union[NDVarArg, Sequence[NDVarArg]]) – Data to plot.
xax (CategorialArg) – Create a separate plot for each cell in this model.
data (Dataset) – If a Dataset is provided, data can be specified as strings.
sub (IndexArg) – Specify a subset of the data.
vmax (float) – Upper limits for the colormap (default is determined from data).
vmin (float) – Lower limit for the colormap (default
-vmax
).cmap (CMapArg) – Colormap (default depends on the data).
contours (Union[int, Sequence, Dict]) – Contours to draw on topomaps. Can be an int (number of contours, including
vmin
/vmax
), a sequence (values at which to draw contours), or a**kwargs
dict (must contain at least the “levels” key). Default is no contours.ntopo (int) – number of topomaps per array-plot.
t (Sequence[float]) – Time points for topomaps.
xlim (scalar | (scalar, scalar)) – Initial x-axis view limits as
(left, right)
tuple or aslength
scalar (default is the full x-axis in the data).proj (str) – The sensor projection to use for topomaps.
res (int) – Resolution of the topomaps (width = height =
res
).interpolation (InterpolationArg) – Method for interpolating topo-map between sensors (default is based on mne-python).
clip (bool | 'even' | 'circle') – Outline for clipping topomaps: ‘even’ to clip at a constant distance (default), ‘circle’ to clip using a circle.
clip_distance (float) – How far from sensor locations to clip (1 is the axes height/width).
head_radius (Union[float, Tuple[float, float]]) – Radius of the head outline drawn over sensors (on sensor plots with normalized positions, 0.45 is the outline of the topomap); 0 to plot no outline; tuple for separate (right, anterior) radius. The default is determined automatically.
head_pos (Union[float, Sequence[float]]) – Head outline position along the anterior axis (0 is the center, 0.5 is the top end of the plot).
im_interpolation (str) – Topomap image interpolation (see Matplotlib’s
imshow()
). Matplotlib 1.5.3’s SVG output can’t handle uneven aspect withinterpolation='none'
, useinterpolation='nearest'
instead.sensors (Union[str, matplotlib.markers.MarkerStyle]) – How to mark sensor locations in the topomap (empty string
''
to omit marks).sensorlabels (SensorLabelsArg) – Show sensor labels. For ‘name’, any prefix common to all names is removed; with ‘fullname’, the full name is shown. Set to
''
to hide sensor position markers completely.mark (Sensor index) – Sensors which to mark.
mcolor (matplotlib color) – Color for marked sensors.
axtitle (Union[bool, Sequence[str]]) – Title for the individual axes. The default is to show the names of the epochs, but only if multiple axes are plotted.
xlabel (Union[bool, str]) – X-axis label. By default the label is inferred from the data.
ylabel (Union[bool, str]) – Y-axis label. By default the label is inferred from the data.
xticklabels (Union[str, int, Sequence[int]]) – Specify which axes should be annotated with x-axis tick labels. Use
int
for a single axis, a sequence ofint
for multiple specific axes, or one of'left' | 'bottom' | 'all' | 'none'
.yticklabels (Union[str, int, Sequence[int]]) – Specify which axes should be annotated with y-axis tick labels. Use
int
for a single axis, a sequence ofint
for multiple specific axes, or one of'left' | 'bottom' | 'all' | 'none'
.connectionstyle (str) – Style for the connections between the image array-plot and the topo-maps. Set to
''
for straight connections. See Matplotlib demo.connection_color (ColorArg) – Color for connection line.
topo_labels (Literal['above', 'below', 'none']) – Where to label time on topo-maps.
gridspec_kw (dict) – The figure attempts to produce a useful layout, but sometimes this will still result in unwanted artifacts like overlapping text; use gridspec parameters to customize the spacing (see :class:~matplotlib.gridspec.GridSpec).
... – Also accepts General layout parameters.
Notes
- LMB click on a topomap selects it for tracking the mouse pointer
LMB on the array plot fixates the topomap time point
RMB on a topomap removes the topomap
Methods
|
Add a contour line |
|
Draw a horizontal line on one or more axes |
|
Draw a horizontal bar on one or more axes |
|
Draw a vertical line on one or more axes |
|
Draw a vertical bar on one or more axes |
|
Draw vertical bars over axes |
|
Close the figure. |
|
(Re-)draw the figure (after making manual changes). |
|
Draw crosshairs under the cursor |
|
Draw the outline of the figure |
|
Retrieve colormap value limits as |
|
|
|
Create FMTXT Image from the figure |
|
Plot a colorbar corresponding to the displayed data |
|
Short-cut for Matplotlib's |
|
Change the colormap |
|
Set the figure window title |
|
Set the time point for a topo-map (same for all array plots) |
|
Set the time for a single topomap. |
|
Set the time points displayed in topo-maps across all array-plots |
|
Change the colormap limits |
|
Set the label for the x-axis |
|
Set the x-axis limits for all axes |
|
Rotate every x-axis tick-label by an angle (counterclockwise, in degrees) |
|
Set the label for the y-axis |