mark

Markers for marquee annotations.

Functions

mark_arrow(x, y[, ax, alpha, color, ...])

Draw arrow marker(s) at specified location(s) on a matplotlib plot.

mark_inlaid_asterisk(x, y[, ax, ...])

Draw asterisk badge marker(s) at specified location(s) on a matplotlib p lot.

mark_magnifying_glass(x, y[, ax, alpha, ...])

Draw magnifying glass marker(s) at specified location(s) on a matplotlib plot.

Classes

MarkAlphabeticalBadges

Functor to mark sequentially-lettered badges.

MarkArrow

Functor interface for mark_arrow.

MarkInlaidAsterisk

Functor interface for mark_inlaid_asterisk.

MarkMagnifyingGlass

Functor interface for mark_magnifying_glass.

MarkNumericalBadges

Functor to mark badges numbered by itertools-like count.

MarkRomanBadges

Functor to mark roman numeral badges numbered by itertools-like count.

mark_arrow(x: float | Sequence[float], y: float | Sequence[float], ax: Axes | None = None, *, alpha: float = 1.0, color: str = 'black', color_accent: str | None = None, linecolor: str = 'none', markersize: float = 15, rotate_angle: float = 20, **kwargs) None[source]

Draw arrow marker(s) at specified location(s) on a matplotlib plot.

This function creates an arrow glyph by combining and rotating matplotlib markers.

Parameters:
  • x (float or sequence of floats) – The x-coordinate(s) where the arrow(s) will be placed.

  • y (float or sequence of floats) – The y-coordinate(s) where the arrow(s) will be placed.

  • ax (mpl_axes.Axes, optional) – The axes object on which to draw the markers. If None, plt.gca() will be used.

  • alpha (float, default 1.0) – The transparency level of the markers.

  • color (str, default "black") – The primary color for the glyph components.

  • color_accent (Optional[str], optional) –

    The default accent color for the glyph.

    If color is “white”, defaults “black”. Otherwise, defaults “white”.

  • linecolor (str, default "none") – Color for connecting lines between markers, if any.

  • markersize (float, default 15) – Size for glyph’s largest marker element.

  • rotate_angle (float, default 20) – The angle (in degrees) to rotate the arrow part of the glyph.

  • **kwargs (dict, optional) – Additional keyword arguments forward to matplotlib plot.

Return type:

None

See also

outset.mark.MarkArrow

Functor interface for mark_arrow.

mark_inlaid_asterisk(x: float | Sequence[float], y: float | Sequence[float], ax: Axes | None = None, *, asterisk_edgewidth: float = 1, color: str = 'black', color_accent: str = 'white', color_asterisk_edge: Tuple | str = ('color', 0.7), color_asterisk_face: Tuple | str = ('color', 0.7), color_badge: Tuple | str = ('color', 0.3), color_underlay: Tuple | str = 'color_accent', marker: Tuple = (6, 2, 0), marker_badge: str = 'o', marker_underlay: str = 'o', linecolor: str = 'none', markersize: float = 22, scale_asterisk: float = 0.3, scale_badge: float = 0.8, **kwargs) None[source]

Draw asterisk badge marker(s) at specified location(s) on a matplotlib p lot.

This function stacks matplotlib markers to render an asterisk overlaid onto a circular badge with a slightly larger circular underlay.

Parameters:
  • x (float or sequence of floats) – The x-coordinate(s) where the asterisk badge(s) will be placed.

  • y (float or sequence of floats) – The y-coordinate(s) where the asterisk badge(s) will be placed.

  • ax (mpl_axes.Axes, optional) – The axes object on which to draw the markers. If None, plt.gca() will be used.

  • asterisk_edgewidth (float, default 1) – The edge width of the asterisk marker.

  • color (str, default "black") – The primary color for the glyph.

  • color_accent (Optional[str], optional) –

    The default accent color for the glyph.

    If color is “white”, defaults “black”. Otherwise, defaults “white”.

  • color_asterisk_edge (Union[str, tuple], default ("color", 0.7)) –

    The edge color of the asterisk marker.

    If “color”, primary color will be substituted.

  • color_asterisk_face (Union[str, tuple], default ("color", 0.7)) –

    The face color of the asterisk marker.

    If “color”, primary color will be substituted.

  • color_badge (Union[str, tuple], default ("color", 0.3)) –

    The color of the badge.

    If “color”, primary color will be substituted.

  • color_underlay (Union[str, tuple], default "white") – The color of the underlay.

  • marker (tuple, default (6, 2, 0)) – The marker style for the asterisk. Default is 6 points, rotated 0 degrees.

  • marker_badge (str, default "o") – The marker style for the badge.

  • marker_underlay (str, default "o") – The marker style for the underlay.

  • linecolor (str, default "none") – The color of the line connecting markers, if any.

  • markersize (float, default 22) – Size for glyph’s largest marker element.

  • scale_asterisk (float, default 0.3) – The scaling factor for the asterisk size.

  • scale_badge (float, default 0.8) – The scaling factor for the badge size.

  • **kwargs (dict, optional) – Additional keyword arguments forward to matplotlib plot.

Return type:

None

See also

outset.mark.MarkInlaidAsterisk

Functor interface for mark_inlaid_asterisk.

mark_magnifying_glass(x: float | Sequence[float], y: float | Sequence[float], ax: Axes | None = None, *, alpha: float = 1.0, color: str = 'black', color_accent: str | None = None, linecolor: str = 'none', markersize: float = 15, rotate_angle: float = 20, **kwargs) None[source]

Draw magnifying glass marker(s) at specified location(s) on a matplotlib plot.

This function creates a magnifying glass glyph by stacking several matplotlib markers.

Parameters:
  • x (float or sequence of floats) – The x-coordinate(s) where the magnifying glass(es) will be placed.

  • y (float or sequence of floats) – The y-coordinate(s) where the magnifying glass(es) will be placed.

  • ax (mpl_axes.Axes, optional) –

    The axes object on which to draw the markers.

    If None, plt.gca() will be used.

  • color_accent (Optional[str], optional) –

    The default accent color for the glyph.

    If color is “white”, defaults “black”. Otherwise, defaults “white”.

  • alpha (float, default 1.0) – The transparency level of the markers.

  • color (str, default "black") – The primary color for the glyph components.

  • linecolor (str, default "none") – Color for connecting lines between markers, if any.

  • markersize (float, default 15) – Size for glyph’s largest marker element.

  • rotate_angle (float, default 20) – The angle (in degrees) to rotate the asterisk part of the magnifying glass.

  • **kwargs (dict, optional) – Additional keyword arguments forward to matplotlib plot.

Return type:

None

class MarkAlphabeticalBadges[source]

Functor to mark sequentially-lettered badges.

This class renders markers as letters overlaid onto a circular badge with a slightly larger circular underlay.

__init__(start: str = 'a', step: int = 1, **kwargs) None[source]

Initialize functor.

Parameters:
  • start (str, default "a") –

    The starting number for the alphabetical badges.

    Pass “A” for uppercase letters.

  • step (int, default 1) – The step size for the alphabetical badges.

  • kwargs (dict) – Additional kwargs forward to __call__.

__call__(x: float, y: float, ax: Axes | None = None, *, color: str = 'black', color_accent: str | None = None, color_letter: Tuple | str = 'color_accent', color_badge: Tuple | str = 'color', color_underlay: Tuple | str = 'color_accent', letter_edgewidth: float = 1, marker_badge: str = 'o', marker_underlay: str = 'o', markersize: float = 22, scale_letter: float = 0.4, scale_badge: float = 0.8, **kwargs) None[source]

Draw lettered badge marker at specified location.

Alphabetical values increment with each call to this functor.

Parameters:
  • x (float) – The x-coordinate where the alphabetical badge will be placed.

  • y (float) – The y-coordinate where the alphabetical badge will be placed.

  • ax (mpl_axes.Axes, optional) – The axes object on which to draw the marker. If None, plt.gca() will be used.

  • color (str, default "black") – The primary color for the glyph.

  • color_accent (Optional[str], optional) –

    The default accent color for the glyph.

    If color is “white”, defaults “black”. Otherwise, defaults “white”.

  • color_letter (Union[str, tuple], default "white") – The color of the letter.

  • color_badge (Union[str, tuple], default "color") –

    The color of the badge.

    If “color”, primary color will be substituted.

  • color_underlay (Union[str, tuple], default "color_accent") –

    The color of the underlay.

    If “color_accent”, accent color will be substituted.

  • letter_edgewidth (float, default 1) – The edge width of the letter marker.

  • marker_badge (str, default "o") – The marker style for the badge.

  • marker_underlay (str, default "o") – The marker style for the underlay.

  • markersize (float, default 22) – Size for glyph’s largest marker element.

  • scale_letter (float, default 0.4) – The scaling factor for the letter size.

  • scale_badge (float, default 0.8) – The scaling factor for the badge size.

  • **kwargs (dict, optional) – Additional keyword arguments forward to matplotlib plot.

Return type:

None

class MarkArrow[source]

Functor interface for mark_arrow.

__init__(**kwargs) None[source]

Initialize functor.

kwargs will forward to __call__.

__call__(*args, **kwargs)[source]

Forwards to mark_arrow.

class MarkInlaidAsterisk[source]

Functor interface for mark_inlaid_asterisk.

__init__(**kwargs) None[source]

Initialize functor.

kwargs will forward to __call__.

__call__(*args, **kwargs)[source]

Forwards to mark_inlaid_asterisk.

class MarkMagnifyingGlass[source]

Functor interface for mark_magnifying_glass.

__init__(**kwargs) None[source]

Initialize functor.

kwargs will forward to __call__.

__call__(*args, **kwargs)[source]

Forwards to mark_magnifying_glass.

class MarkNumericalBadges[source]

Functor to mark badges numbered by itertools-like count.

This class renders markers as numbers overlaid onto a circular badge with a slightly larger circular underlay.

__init__(start: int = 1, step: int = 1, **kwargs) None[source]

Initialize functor.

Parameters:
  • start (int, default 1) – The starting number for the numerical badges.

  • step (int, default 1) – The step size for the numerical badges.

  • kwargs (dict) – Additional kwargs will forward to __call_.

__call__(x: float, y: float, ax: Axes | None = None, *, color: str = 'black', color_accent: str | None = None, color_numeral: Tuple | str = 'color_accent', color_badge: Tuple | str = 'color', color_underlay: Tuple | str = 'color_accent', marker_badge: str = 'o', marker_underlay: str = 'o', markersize: float = 22, numeral_edgewidth: float = 1, scale_numeral: float = 0.4, scale_badge: float = 0.8, **kwargs) None[source]

Draw numbered badge marker at specified location.

Numeral values increment with each call to this functor.

Parameters:
  • x (float) – The x-coordinate where the numerical badge will be placed.

  • y (float) – The y-coordinate where the numerical badge will be placed.

  • ax (mpl_axes.Axes, optional) – The axes object on which to draw the marker. If None, plt.gca() will be used.

  • color (str, default "black") – The primary color for the glyph.

  • color_accent (Optional[str], optional) –

    The default accent color for the glyph.

    If color is “white”, defaults “black”. Otherwise, defaults “white”.

  • color_numeral (Union[str, tuple], default "white") – The color of the numeral.

  • color_badge (Union[str, tuple], default "color") –

    The color of the badge.

    If “color”, primary color will be substituted.

  • color_underlay (Union[str, tuple], default "color_accent") –

    The color of the underlay.

    If “color_accent”, accent color will be substituted.

  • marker_badge (str, default "o") – The marker style for the badge.

  • marker_underlay (str, default "o") – The marker style for the underlay.

  • markersize (float, default 22) – Size for glyph’s largest marker element.

  • numeral_edgewidth (float, default 1) – The edge width of the numeral marker.

  • scale_numeral (float, default 0.4) – The scaling factor for the numeral size.

  • scale_badge (float, default 0.8) – The scaling factor for the badge size.

  • **kwargs (dict, optional) – Additional keyword arguments forward to matplotlib plot.

Return type:

None

class MarkRomanBadges[source]

Functor to mark roman numeral badges numbered by itertools-like count.

This class renders markers as roman numerals overlaid onto a circular badge with a slightly larger circular underlay. Both lower and uppercase numerals are supported.

Notes

Due to unicode limitations values greater than twelve will not display correctly. Numeral representation for zero is not supported.

__init__(start: int = 1, step: int = 1, *, upper: bool = False, **kwargs) None[source]

Initialize functor.

Parameters:
  • start (int, default 1) –

    The starting number for the numerical badges.

    Must be between 1 and 12, inclusive.

  • step (int, default 1) – The step size for the numerical badges.

  • upper (bool, default False) – Should numerals be uppercase?

  • kwwargs (dict) – Additional kwargs forward to __call__.

ftor = <outset.mark._MarkAlphabeticalBadges.MarkAlphabeticalBadges object>
__call__(x: float, y: float, ax: Axes | None = None, *, color: str = 'black', color_accent: str | None = None, color_numeral: Tuple | str = 'color_accent', color_badge: Tuple | str = 'color', color_underlay: Tuple | str = 'color_accent', marker_badge: str = 'o', marker_underlay: str = 'o', markersize: float = 22, numeral_edgewidth: float = 0, scale_numeral: float = 0.4, scale_badge: float = 0.8, **kwargs) None[source]

Draw roman numeral badge marker at specified location.

Numeral values increment with each call to this functor.

Parameters:
  • x (float) – The x-coordinate where the numerical badge will be placed.

  • y (float) – The y-coordinate where the numerical badge will be placed.

  • ax (mpl_axes.Axes, optional) – The axes object on which to draw the marker. If None, plt.gca() will be used.

  • color (str, default "black") – The primary color for the glyph.

  • color_accent (Optional[str], optional) –

    The default accent color for the glyph.

    If color is “white”, defaults “black”. Otherwise, defaults “white”.

  • color_numeral (Union[str, tuple], default "white") – The color of the numeral.

  • color_badge (Union[str, tuple], default "color") –

    The color of the badge.

    If “color”, primary color will be substituted.

  • color_underlay (Union[str, tuple], default "color_accent") –

    The color of the underlay.

    If “color_accent”, accent color will be substituted.

  • marker_badge (str, default "o") – The marker style for the badge.

  • marker_underlay (str, default "o") – The marker style for the underlay.

  • markersize (float, default 22) – Size for glyph’s largest marker element.

  • numeral_edgewidth (float, default 1) – The edge width of the numeral marker.

  • scale_numeral (float, default 0.4) – The scaling factor for the numeral size.

  • scale_badge (float, default 0.8) – The scaling factor for the badge size.

  • **kwargs (dict, optional) – Additional keyword arguments forward to matplotlib plot.

Return type:

None