eelbrain.plot.ColorList¶
-
class
eelbrain.plot.
ColorList
(colors, cells=None, labels=None, size=None, h='auto', *args, **kwargs)¶ Plot colors with labels
Parameters: - colors : dict
Colors for cells.
- cells : tuple
Cells for which to plot colors (default is
colors.keys()
).- labels : dict (optional)
Condition labels that are used instead of the keys in
colors
. This is useful ifcolors
uses abbreviated labels, but the color legend should contain more intelligible labels.- size : scalar
Size (width and height) of the color squares (the default is to scale them to fit the font size).
- h : ‘auto’ | scalar
Height of the figure in inches. If ‘auto’ (default), the height is chosen to fit all labels.
- …
Also accepts General layout parameters.
Attributes: - labels : list of
matplotlib.text.Text
Color labels.
Methods¶
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 |