class eelbrain.plot.ColorGrid(row_cells, column_cells, colors, size=None, column_label_position='top', row_first=None, labels=None, shape='box', **kwargs)

Plot colors for a two-way design in a grid

  • row_cells (Sequence[str]) – Cells contained in the rows.

  • column_cells (Sequence[str]) – Cells contained in the columns.

  • colors (dict) – Colors for cells.

  • size (Optional[float]) – Size (width and height) of the color squares (the default is to scale them to fit the font size).

  • column_label_position ('top' | 'bottom' | 'none') – Where to place the column labels (default is ‘top’).

  • row_first (Optional[bool]) – Whether the row cell precedes the column cell in color keys. By default this is inferred from the existing keys.

  • labels (Optional[dict]) – Condition labels that are used instead of the keys in row_cells and column_cells.

  • shape ('box' | 'line') – Shape for color samples (default ‘box’).

  • .. – Also accepts General layout parameters.



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


Close the figure.


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


Draw crosshairs under the cursor

image([name, format, close])

Create FMTXT Image from the figure

save(*args, **kwargs)

Short-cut for Matplotlib’s savefig()


Set the figure window title

set_xlabel(label[, ax])

Set the label for the x-axis


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

set_ylabel(label[, ax])

Set the label for the y-axis