publiplots.MarkerPatch

class publiplots.MarkerPatch(marker='o', **kwargs)[source]

Custom marker patch object for legend handles. Embeds marker symbol and markersize properties.

__init__(marker='o', **kwargs)[source]

The following kwarg properties are supported

Properties:

agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image alpha: unknown animated: bool antialiased or aa: bool or None capstyle: .CapStyle or {‘butt’, ‘projecting’, ‘round’} clip_box: ~matplotlib.transforms.BboxBase or None clip_on: bool clip_path: Patch or (Path, Transform) or None color: color edgecolor or ec: color or None facecolor or fc: color or None figure: ~matplotlib.figure.Figure or ~matplotlib.figure.SubFigure fill: bool gid: str hatch: {‘/’, ‘\’, ‘|’, ‘-’, ‘+’, ‘x’, ‘o’, ‘O’, ‘.’, ‘*’} hatch_linewidth: unknown in_layout: bool joinstyle: .JoinStyle or {‘miter’, ‘round’, ‘bevel’} label: object linestyle or ls: {‘-’, ‘–’, ‘-.’, ‘:’, ‘’, (offset, on-off-seq), …} linewidth or lw: float or None mouseover: bool path_effects: list of .AbstractPathEffect picker: None or bool or float or callable rasterized: bool sketch_params: (scale: float, length: float, randomness: float) snap: bool or None transform: ~matplotlib.transforms.Transform url: str visible: bool zorder: float

Methods

__init__([marker])

The following kwarg properties are supported

add_callback(func)

Add a callback function that will be called whenever one of the .Artist's properties changes.

contains(mouseevent[, radius])

Test whether the mouse event occurred in the patch.

contains_point(point[, radius])

Return whether the given point is inside the patch.

contains_points(points[, radius])

Return whether the given points are inside the patch.

convert_xunits(x)

Convert x using the unit type of the xaxis.

convert_yunits(y)

Convert y using the unit type of the yaxis.

draw(renderer)

Draw the Artist (and its children) using the given renderer.

findobj([match, include_self])

Find artist objects.

format_cursor_data(data)

Return a string representation of data.

get_aa()

Alias for get_antialiased.

get_agg_filter()

Return filter function to be used for agg filter.

get_alpha()

Return the alpha value used for blending - not supported on all backends.

get_animated()

Return whether the artist is animated.

get_antialiased()

Return whether antialiasing is used for drawing.

get_capstyle()

Return the capstyle.

get_children()

Return a list of the child .Artists of this .Artist.

get_clip_box()

Return the clipbox.

get_clip_on()

Return whether the artist uses clipping.

get_clip_path()

Return the clip path.

get_cursor_data(event)

Return the cursor data for a given event.

get_data_transform()

Return the ~.transforms.Transform mapping data coordinates to physical coordinates.

get_ec()

Alias for get_edgecolor.

get_edgecolor()

Return the edge color.

get_extents()

Return the Patch's axis-aligned extents as a ~.transforms.Bbox.

get_facecolor()

Return the face color.

get_fc()

Alias for get_facecolor.

get_figure([root])

Return the .Figure or .SubFigure instance the artist belongs to.

get_fill()

Return whether the patch is filled.

get_gid()

Return the group id.

get_hatch()

Return the hatching pattern.

get_hatch_linewidth()

Return the hatch linewidth.

get_in_layout()

Return boolean flag, True if artist is included in layout calculations.

get_joinstyle()

Return the joinstyle.

get_label()

Return the label used for this artist in the legend.

get_linestyle()

Return the linestyle.

get_linewidth()

Return the line width in points.

get_ls()

Alias for get_linestyle.

get_lw()

Alias for get_linewidth.

get_marker()

get_markeredgewidth()

get_markersize()

get_mouseover()

Return whether this artist is queried for custom context information when the mouse cursor moves over it.

get_patch_transform()

Return the ~.transforms.Transform instance mapping patch coordinates to data coordinates.

get_path()

Return the path of this patch.

get_path_effects()

get_picker()

Return the picking behavior of the artist.

get_rasterized()

Return whether the artist is to be rasterized.

get_sketch_params()

Return the sketch parameters for the artist.

get_snap()

Return the snap setting.

get_tightbbox([renderer])

Like .Artist.get_window_extent, but includes any clipping.

get_transform()

Return the ~.transforms.Transform applied to the Patch.

get_transformed_clip_path_and_affine()

Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation.

get_url()

Return the url.

get_verts()

Return a copy of the vertices used in this patch.

get_visible()

Return the visibility.

get_window_extent([renderer])

Get the artist's bounding box in display space.

get_zorder()

Return the artist's zorder.

have_units()

Return whether units are set on any axis.

is_transform_set()

Return whether the Artist has an explicitly set transform.

pchanged()

Call all of the registered callbacks.

pick(mouseevent)

Process a pick event.

pickable()

Return whether the artist is pickable.

properties()

Return a dictionary of all the properties of the artist.

remove()

Remove the artist from the figure if possible.

remove_callback(oid)

Remove a callback based on its observer id.

set(*[, agg_filter, alpha, animated, ...])

Set multiple properties at once.

set_aa(aa)

Alias for set_antialiased.

set_agg_filter(filter_func)

Set the agg filter.

set_alpha(alpha)

Set the alpha value used for blending - not supported on all backends.

set_animated(b)

Set whether the artist is intended to be used in an animation.

set_antialiased(aa)

Set whether to use antialiased rendering.

set_capstyle(s)

Set the .CapStyle.

set_clip_box(clipbox)

Set the artist's clip .Bbox.

set_clip_on(b)

Set whether the artist uses clipping.

set_clip_path(path[, transform])

Set the artist's clip path.

set_color(c)

Set both the edgecolor and the facecolor.

set_ec(color)

Alias for set_edgecolor.

set_edgecolor(color)

Set the patch edge color.

set_facecolor(color)

Set the patch face color.

set_fc(color)

Alias for set_facecolor.

set_figure(fig)

Set the .Figure or .SubFigure instance the artist belongs to.

set_fill(b)

Set whether to fill the patch.

set_gid(gid)

Set the (group) id for the artist.

set_hatch(hatch)

Set the hatching pattern.

set_hatch_linewidth(lw)

Set the hatch linewidth.

set_in_layout(in_layout)

Set if artist is to be included in layout calculations, E.g.

set_joinstyle(s)

Set the .JoinStyle.

set_label(s)

Set a label that will be displayed in the legend.

set_linestyle(ls)

Set the patch linestyle.

set_linewidth(w)

Set the patch linewidth in points.

set_ls(ls)

Alias for set_linestyle.

set_lw(w)

Alias for set_linewidth.

set_marker(marker)

set_markeredgewidth(markeredgewidth)

set_markersize(markersize)

set_mouseover(mouseover)

Set whether this artist is queried for custom context information when the mouse cursor moves over it.

set_path_effects(path_effects)

Set the path effects.

set_picker(picker)

Define the picking behavior of the artist.

set_rasterized(rasterized)

Force rasterized (bitmap) drawing for vector graphics output.

set_sketch_params([scale, length, randomness])

Set the sketch parameters.

set_snap(snap)

Set the snapping behavior.

set_transform(t)

Set the artist transform.

set_url(url)

Set the url for the artist.

set_visible(b)

Set the artist's visibility.

set_zorder(level)

Set the zorder for the artist.

update(props)

Update this artist's properties from the dict props.

update_from(other)

Copy properties from other to self.

Attributes

axes

The ~.axes.Axes instance the artist resides in, or None.

figure

The (Sub)Figure that the artist is on.

fill

Return whether the patch is filled.

mouseover

Return whether this artist is queried for custom context information when the mouse cursor moves over it.

stale

Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist.

sticky_edges

x and y sticky edge lists for autoscaling.

zorder

get_marker()[source]
set_marker(marker)[source]
get_markersize()[source]
set_markersize(markersize)[source]
get_markeredgewidth()[source]
set_markeredgewidth(markeredgewidth)[source]
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, capstyle=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, color=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, fill=<UNSET>, gid=<UNSET>, hatch=<UNSET>, hatch_linewidth=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, marker=<UNSET>, markeredgewidth=<UNSET>, markersize=<UNSET>, mouseover=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)

Set multiple properties at once.

Supported properties are

Properties:

agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image alpha: float or None animated: bool antialiased or aa: bool or None capstyle: .CapStyle or {‘butt’, ‘projecting’, ‘round’} clip_box: ~matplotlib.transforms.BboxBase or None clip_on: bool clip_path: Patch or (Path, Transform) or None color: color edgecolor or ec: color or None facecolor or fc: color or None figure: ~matplotlib.figure.Figure or ~matplotlib.figure.SubFigure fill: bool gid: str hatch: {‘/’, ‘\’, ‘|’, ‘-’, ‘+’, ‘x’, ‘o’, ‘O’, ‘.’, ‘*’} hatch_linewidth: unknown in_layout: bool joinstyle: .JoinStyle or {‘miter’, ‘round’, ‘bevel’} label: object linestyle or ls: {‘-’, ‘–’, ‘-.’, ‘:’, ‘’, (offset, on-off-seq), …} linewidth or lw: float or None marker: unknown markeredgewidth: unknown markersize: unknown mouseover: bool path_effects: list of .AbstractPathEffect picker: None or bool or float or callable rasterized: bool sketch_params: (scale: float, length: float, randomness: float) snap: bool or None transform: ~matplotlib.transforms.Transform url: str visible: bool zorder: float