publiplots.HandlerMarker

class publiplots.HandlerMarker(**kwargs)[source]

Generic legend handler for any matplotlib marker type.

Automatically creates double-layer markers (transparent fill + opaque edge) for all marker symbols: ‘o’, ‘^’, ‘s’, ‘D’, ‘*’, etc.

__init__(**kwargs)[source]
Parameters:
  • xpad (float, optional) – Padding in x-direction.

  • ypad (float, optional) – Padding in y-direction.

  • update_func (callable, optional) – Function for updating the legend handler properties from another legend handler, used by ~HandlerBase.update_prop.

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)

create_artists(legend, orig_handle, xdescent, ydescent, width, height, fontsize, trans)[source]

Create the legend marker artists.