anyplotlib.markers.MarkerGroup#

class anyplotlib.markers.MarkerGroup(marker_type, name, kwargs, push_fn)[source]#

Bases: object

A named collection of markers of one type on one plot.

Parameters:
  • marker_type (str) – One of the supported marker types ('circles', 'lines', …).

  • name (str) – User-facing name (key in the parent MarkerTypeDict).

  • kwargs (dict) – Initial matplotlib-style kwargs for this group.

  • push_fn (callable) – Zero-arg callback that serialises the full registry and pushes it to the parent figure trait.

set(**kwargs)[source]#

Update one or more properties and push the change to the plot.

Parameters:

**kwargs (dict) – Properties to update (e.g., offsets, radius, facecolors). Matplotlib-style names are translated to wire format.

Return type:

None

to_wire(group_id)[source]#

Return a dict in the JS wire format for this marker group.

Parameters:

group_id (str) – Unique identifier for this marker group (usually UUID).

Returns:

Wire-format dict with type-specific structure, ready for JSON serialization and transmission to the JavaScript renderer.

Return type:

dict