class eelbrain.plot.Array(y, xax=None, xlabel=True, ylabel=True, xticklabels='bottom', ds=None, sub=None, x='time', vmax=None, vmin=None, cmap=None, axtitle=True, interpolation=None, xlim=None, *args, **kwargs)

Plot UTS data to a rectangular grid.

y : (list of) NDVar

Data to plot.

xax : None | categorial

Create a separate plot for each cell in this model.

xlabel, ylabel : bool | str

Labels for x- and y-axis; the default is determined from the data.

xticklabels : bool | int | list of int

Specify which axes should be annotated with x-axis tick labels. Use int for a single axis (default -1), a sequence of int for multiple specific axes, or bool for all/none.

ds : None | Dataset

If a Dataset is provided, epochs and xax can be specified as strings.

sub : str | array

Specify a subset of the data.

x : str

Dimension to plot on the x axis (default ‘time’).

vmax : scalar

Upper limits for the colormap.

vmin : scalar

Lower limit for the colormap.

cmap : str

Colormap (default depends on the data).

axtitle : bool | sequence of str

Title for the individual axes. The default is to show the names of the epochs, but only if multiple axes are plotted.

interpolation : str

Array image interpolation (see Matplotlib’s imshow()). Matplotlib 1.5.3’s SVG output can’t handle uneven aspect with interpolation='none', use interpolation='nearest' instead.

xlim : scalar | (scalar, scalar)

Initial x-axis view limits as (left, right) tuple or as length scalar (default is the full x-axis in the data).

tight : bool

Use matplotlib’s tight_layout to expand all axes to fill the figure (default True)

Also accepts General layout parameters.


  • : scroll left
  • : scroll right
  • home: scroll to beginning
  • end: scroll to end
  • f: zoom in (reduce x axis range)
  • d: zoom out (increase x axis range)


add_contour(self, level[, color, meas]) Add a contour line
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
add_vspans(self, intervals[, axes]) Draw vertical bars over 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
get_time(self) Retrieve the current time
get_vlim(self[, meas]) Retrieve colormap value limits as (vmin, vmax) tuple
image(self[, name, format]) Create FMTXT Image from the figure
link_time_axis(self, other) Link the time axis of this figure with another figure
play_movie(self[, time_dilation]) Cycle through the time axis
plot_colorbar(self[, label, label_position, …]) Plot a colorbar corresponding to the displayed data
save(self, *args, **kwargs) Short-cut for Matplotlib’s savefig()
save_movie(self[, filename, time_dilation]) Save the figure with moving time axis as movie
set_cmap(self, cmap[, meas]) Change the colormap in the array plots
set_name(self, name) Set the figure window title
set_time(self, time) Set the time point to display
set_vlim(self[, v, vmax, meas]) Change the colormap limits
set_xlabel(self, label[, ax]) Set the label for the x-axis
set_xlim(self[, left, right]) Set the x-axis limits for all axes
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