LineStack.plot_legend(loc='fig', labels=None, **kwargs)

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

  • loc (Union[str, int, Tuple[float, float], bool, None]) – Where to plot the legend (see Notes; default ‘fig’).

  • labels (dict) – Dictionary with alternate labels for all cells.

  • ... – Parameters for eelbrain.plot.Legend.


legend_figure – If loc==’fig’ the Figure, otherwise None.

Return type

None | legend


legend content can be modified through the figure’s legend_handles and legend_labels attributes.

Possible values for the loc argument:


Make the current legend invisible


Plot the legend in a new figure


The legend can be dragged to the desired position with the mouse pointer.

str | int | (float, float):

Matplotlib legend() position argument.