lgca.plots.draw_wedges

lgca.plots.draw_wedges(ax, family, cum_pop_t, children_nlist, timeline, facecolour_map, edgecolour, label_map=None, lw=0.7, bottom=None, level=None, rel_freq=None, clipped_x=None)

Plot a Muller plot on ax along a timeline grid starting from one family. Adapted from https://phylo-baltic.github.io/baltic-gallery/advanced-muller-plots-raw/ :type ax: :param ax: matplotlib.Axes.axes: the axis to draw wedges on

# content parameters :type family: :param family: family ID :type cum_pop_t: :param cum_pop_t: array of shape (time, families): cumulative populations of all families and all their children :type children_nlist: :param children_nlist: family tree as nested list of child family IDs, index=parent of the children :type timeline: :param timeline: array, timesteps of the simulation

# plot customisation :type facecolour_map: :param facecolour_map: callable that returns the facecolour of a wedge from the family ID :type edgecolour: :param edgecolour: edgecolour of wedges :type label_map: :param label_map: callable that returns the label for a wedge from the family ID :type lw: :param lw: line width of the wedge edges

# parameters for recursion :type bottom: :param bottom: lower boundary of wedge area to be filled :type level: :param level: level of family in the family tree :type rel_freq: :param rel_freq: array, relative cumulative population of the family and its children over time :type clipped_x: :param clipped_x: subset of the array indices where rel_freq > 0