eelbrain.plot.Array

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

Plot UTS data to a rectangular grid.

Parameters
  • y ((list of) NDVar) – Data to plot.

  • xax (None | categorial) – Create a separate plot for each cell in this model.

  • xlabel (Union[bool, str]) – Labels for x-axis; the default is determined from the data.

  • ylabel (Union[bool, str]) – Labels for y-axis; the default is determined 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 of int 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 of int for multiple specific axes, or one of 'left' | 'bottom' | 'all' | 'none'.

  • ds (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 (Optional[float]) – Upper limits for the colormap.

  • vmin (Optional[float]) – 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.

Notes

Navigation:
  • : 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)

Methods

add_contour(level[, color, meas])

Add a contour line

add_hline(y[, axes])

Draw a horizontal line on one or more axes

add_hspan(bottom, top[, axes])

Draw a horizontal bar on one or more axes

add_vline(x[, axes])

Draw a vertical line on one or more axes

add_vspan(xmin, xmax[, axes])

Draw a vertical bar on one or more axes

add_vspans(intervals[, axes])

Draw vertical bars over axes

close()

Close the figure.

draw()

(Re-)draw the figure (after making manual changes).

draw_crosshairs([enable])

Draw crosshairs under the cursor

draw_outline([color])

Draw the outline of the figure

get_time()

Retrieve the current time

get_vlim([meas])

Retrieve colormap value limits as (vmin, vmax) tuple

get_xlim()

image([name, format, close])

Create FMTXT Image from the figure

link_time_axis(other)

Link the time axis of this figure with another figure

play_movie([time_dilation])

Cycle through the time axis

plot_colorbar([label, label_position, ...])

Plot a colorbar corresponding to the displayed data

save(*args, **kwargs)

Short-cut for Matplotlib's savefig()

save_movie([filename, time_dilation])

Save the figure with moving time axis as movie

set_cmap(cmap[, meas])

Change the colormap in the array plots

set_name(name)

Set the figure window title

set_time(time)

Set the time point to display

set_vlim([v, vmax, meas])

Change the colormap limits

set_xlabel(label[, ax])

Set the label for the x-axis

set_xlim([left, right])

Set the x-axis limits for all axes

set_xtick_rotation(rotation)

Rotate every x-axis tick-label by an angle (counterclockwise, in degrees)

set_ylabel(label[, ax])

Set the label for the y-axis