anyplotlib.markers.MarkerTypeDict#

class anyplotlib.markers.MarkerTypeDict(marker_type, push_fn)[source]#

Bases: object

Dict-like container for all named groups of one marker type.

Any modification (__setitem__, __delitem__) automatically triggers the _push_fn callback so the plot re-renders.

Parameters:
  • marker_type (str) – Type of markers (e.g., ‘circles’, ‘arrows’, ‘lines’).

  • push_fn (callable) – Zero-arg callback to trigger re-render on mutations.

keys()[source]#

Return group names.

values()[source]#

Return MarkerGroup objects.

items()[source]#

Return (name, MarkerGroup) pairs.

pop(name, *args)[source]#

Remove and return a MarkerGroup by name.

Parameters:
  • name (str) – Name of the group to remove.

  • *args (optional) – Default value if name is not found.

Returns:

The removed group, or default value if provided.

Return type:

MarkerGroup

Raises:

KeyError – If name is not found and no default is provided.

to_wire_list()[source]#

Serialise all groups to a list of wire-format dicts.

Return type:

list