eelbrain.plot.colors_for_twoway

eelbrain.plot.colors_for_twoway(x1_cells, x2_cells, hue_start=0.2, hue_shift=0.0, hues=None, lightness=None)

Define cell colors for a two-way design

Parameters:
x1_cells : tuple of str

Cells of the major factor.

x2_cells : tuple of str

Cells of the minor factor.

hue_start : 0 <= scalar < 1

First hue value.

hue_shift : 0 <= scalar < 1

Use that part of the hue continuum between categories to shift hue within categories.

hues : list of scalar

List of hue values corresponding to the levels of the first factor (overrides regular hue distribution).

lightness : scalar | list of scalar

If specified as scalar, colors will occupy the range [lightness, 100-lightness]. Can also be given as list with one value corresponding to each element in the second factor.

Returns:
dict : {tuple: tuple}

Mapping from cells to colors.