class eelbrain.plot.Boxplot(y, x=None, match=None, sub=None, cells=None, bottom=None, top=None, ylabel=True, xlabel=True, xticks=True, xtick_delim='n', test=True, par=True, trend="'", test_markers=True, corr='Hochberg', hatch=False, colors=False, ds=None, label_fliers=False, **kwargs)

Boxplot for a continuous variable

y : Var

Dependent variable.

x : categorial

Category definition (draw one box for every cell in x).

match : None | categorial

Match cases for a repeated measures design.

sub : None | index-array

Use a subset of the data.

cells : None | sequence of cells of x

Cells to plot (optional). All entries have to be cells of x). Can be used to change the order of the bars or plot only certain cells.

bottom : scalar

Lowest possible value on the y axis (default is 0 or slightly below the lowest value).

top : scalar

Set the upper x axis limit (default is to fit all the data).

ylabel : str | None

Y axis label (default is inferred from the data).

xlabel : str | bool

X axis label (default is

xticks : None | sequence of str

X-axis tick labels describing the categories. None to plot no labels (Default uses cell names from x).

xtick_delim : str

Delimiter for x axis category descriptors (default is '\n', i.e. the level on each Factor of x on a separate line).

titlekwargs : dict

Keyword arguments for the figure title.

test : bool | scalar

True (default): perform pairwise tests; False/None: no tests; scalar: 1-sample tests against this value.

par : bool

Use parametric test for pairwise comparisons (use non-parametric tests if False).

trend : None | str

Marker for a trend in pairwise comparisons.

test_markers : bool

For pairwise tests, plot markers indicating significance level (stars).

corr : None | ‘hochberg’ | ‘bonferroni’ | ‘holm’

Method for multiple comparison correction (default ‘hochberg’).

hatch : bool | str

Matplotlib Hatch pattern to fill boxes (True to use the module default; default is False).

colors : bool | sequence | dict of matplitlib colors

Matplotlib colors to use for boxes (True to use the module default; default is False, i.e. no colors).

ds : None | Dataset

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

label_fliers : bool

Add labels to flier points (outliers); requires match to be specified.

Also accepts General layout parameters and boxplot() parameters.


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
save(self, *args, **kwargs) Short-cut for Matplotlib’s savefig()
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
set_ylim(self[, bottom, top]) Set the y-axis limits