marsilea.base.LegendMaker#

class marsilea.base.LegendMaker#

Bases: object

add_legends(side='right', pad=0, order=None, stack_by=None, stack_size=3, align_legends=None, align_stacks=None, legend_spacing=10, stack_spacing=10, box_padding=2)#

Draw legend based on the order of annotation

Note

If you want to concatenate plots, please add legend after concatenation, this will merge legends from every plots

Stack is a pack of legends

Parameters:
sidestr, default: ‘left’

Which side to draw legend

padnumber, default: 0
orderarray of plot name
stack_by
stack_size
align_legendsstr

The side to align legends in a stack

align_stacksstr

The side to align stacks

legend_spacingfloat

The space between legends

stack_spacingfloat

The space between stacks

box_paddingfloat

Add pad around the whole legend box

custom_legends(legends, name=None)#

Add custom legends

Parameters:
legendsArtist <matplotlib.artist.Artists>

A legend object

namestr, optional

The name of the legend

layout#
remove_legends()#