publiplots.HandlerRectangle¶
- class publiplots.HandlerRectangle(**kwargs)[source]¶
Custom legend handler for double-layer rectangle markers.
Automatically extracts alpha, linewidth, hatches, and colors from handles.
- __init__(**kwargs)[source]¶
- Parameters:
patch_func (callable, optional) –
The function that creates the legend key artist. patch_func should have the signature:
def patch_func(legend=legend, orig_handle=orig_handle, xdescent=xdescent, ydescent=ydescent, width=width, height=height, fontsize=fontsize)
Subsequently, the created artist will have its
update_propmethod called and the appropriate transform will be applied.**kwargs – Keyword arguments forwarded to .HandlerBase.
Methods
__init__(**kwargs)adjust_drawing_area(legend, orig_handle, ...)create_artists(legend, orig_handle, ...)Create the legend marker artists.
legend_artist(legend, orig_handle, fontsize, ...)Return the artist that this HandlerBase generates for the given original artist/handle.
update_prop(legend_handle, orig_handle, legend)