Skip to content

Commit

Permalink
AMD
Browse files Browse the repository at this point in the history
  • Loading branch information
christianbrodbeck committed Oct 17, 2021
1 parent dd8d022 commit e86542f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions eelbrain/plot/_colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ class ColorList(EelFigure):
Height of the figure in inches (default is chosen to fit all labels).
shape
Shape for color samples (default 'box').
markersize
Size of markers in points.
...
Also accepts :ref:`general-layout-parameters`.
Expand All @@ -255,6 +257,7 @@ def __init__(
size: float = None,
h: float = None,
shape: Literal['box', 'line', 'marker'] = 'box',
markersize: float = None,
**kwargs):
if cells is None:
cells = colors.keys()
Expand Down Expand Up @@ -291,9 +294,9 @@ def __init__(
patch = matplotlib.patches.Rectangle((0, bottom), 1, 1, ec='none', **styles[cell].patch_args)
ax.add_patch(patch)
elif shape == 'line':
ax.plot([0, 1], [y, y], **styles[cell].line_args)
ax.plot([0, 1], [y, y], **styles[cell].line_args, markersize=markersize)
elif shape == 'marker':
ax.scatter(0.5, y, **styles[cell].scatter_args)
ax.scatter(0.5, y, markersize, **styles[cell].scatter_args)
else:
raise ValueError(f"{shape=}")
h = ax.text(1.1, y, labels.get(cell, cell), va='center', ha='left', zorder=2)
Expand Down

0 comments on commit e86542f

Please sign in to comment.