class eelbrain.plot.Scatter(y, x, color=None, size=None, sub=None, data=None, colors=None, vmin=None, vmax=None, markers=None, legend=None, labels=None, alpha=1.0, xlabel=True, ylabel=True, aspect='auto', **kwargs)


  • y (Var | str) – Variable for the y-axis.

  • x (Var | str) – Variable for the x-axis.

  • color (Factor | Interaction | NestedEffect | str | Var) – Plot the correlation separately for different categories.

  • size (Var | str | float) – Size of the markers.

  • sub (Var | ndarray | str) – Use a subset of the data.

  • data (Dataset) – If a Dataset is specified, all data-objects can be specified as names of Dataset variables

  • colors (dict | str) – If color is continuous, a colormap to assign color to values. If color is discrete, a dictionary of colors for values in color.

  • vmin (str) – Lower bound of the colormap.

  • vmax (str) – Upper bound of the colormap.

  • markers (str) – Marker shape (see matplotlib.markers).

  • legend (str | int | Tuple[float, float] | bool | None) – Matplotlib figure legend location argument, or 'fig' to plot the legend in a separate figure.

  • labels (dict) – Alternative labels for legend as {cell: label} dictionary (preserves order).

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

  • ylabel (bool | str) – Labels for y-axis; the default is determined from the data.

  • aspect (float | Literal['auto', 'equal']) – Matplotlib parameter (see set_aspect()).

  • ... – Also accepts General layout parameters.

  • alpha (float) –



Add a diagonal to the plot.

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


Draw the outline of the figure

image([name, format, close])

Create FMTXT Image from the figure

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

Plot a colorbar corresponding to the displayed data

plot_legend([loc, labels])

Plot the legend (or remove it from the figure).

save(*args, **kwargs)

Short-cut for Matplotlib's savefig()

save_legend(*args, **kwargs)

Save the legend as image file


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