eelbrain.plot.SensorMap

class eelbrain.plot.SensorMap(sensors, labels='name', proj='default', size=1, color='k', marker='.', mark=None, head_radius=None, head_pos=0.0, connectivity=False, margins=None, *args, **kwargs)

Plot sensor positions in 2 dimensions

Parameters:
sensors : Sensor | NDVar

The Sensor dimension, or an NDVar with a sensor dimension.

labels : ‘none’ | ‘index’ | ‘name’ | ‘fullname’

Content of the labels. For ‘name’, any prefix common to all names is removed; with ‘fullname’, the full name is shown.

proj:

Transform to apply to 3 dimensional sensor coordinates for plotting locations in a plane

size : scalar

Size for the sensor markers.

color : matplotlib color

Color for the sensor markers.

marker : str

Marker for the sensor positions.

mark : None | list of int

List of sensor indices to mark.

head_radius : scalar | tuple | True

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. True to be equal to plot.Topomap with method="mne". The default is determined automatically.

head_pos : scalar

Head outline position along the anterior axis (0 is the center, 0.5 is the top end of the plot).

connectivity : bool

Show sensor connectivity (default False).

Also accepts General layout parameters.

Methods

add_hline(self, y[, axes]) Draw a horizontal line on one or more axes
add_hspan(self, bottom, top[, axes]) Draw a horizontal bar on one or more axes
add_vline(self, x[, axes]) Draw a vertical line on one or more axes
add_vspan(self, xmin, xmax[, axes]) Draw a vertical bar on one or more axes
close(self) Close the figure.
draw(self) (Re-)draw the figure (after making manual changes).
draw_crosshairs(self[, enable]) Draw crosshairs under the cursor
image(self[, name, format]) Create FMTXT Image from the figure
mark_sensors(self, sensors[, axis, s, c, marker]) Mark given sensors on the plots
remove_markers(self) Remove all sensor markers.
save(self, *args, **kwargs) Short-cut for Matplotlib’s savefig()
separate_labels(self[, pad]) Move overlapping labels apart along the x axis
set_label_color(self[, color])
set_label_text(self[, text]) Add/remove sensor labels
set_name(self, name) Set the figure window title
set_xlabel(self, label[, ax]) Set the label for the x-axis
set_xtick_rotation(self, rotation) Rotate every x-axis tick-label by an angle (counterclockwise, in degrees)
set_ylabel(self, label[, ax]) Set the label for the y-axis
show_connectivity(self[, show]) Show the sensor connectivity as lines connecting sensors.